Forum Replies Created by dpanscik

Viewing 5 posts - 16 through 20 (of 20 total)
  • in reply to: AJAX return data #42141

    I solved this by doing an AJAX post outside of the canvasjs workflow. But very curious if the AJAX post can be done within the canvasjs data: tag.

    in reply to: MVC Stacked Range #42131

    Ahh… Thank you Manoj. I like your answer. Thank you!

    in reply to: MVC Stacked Range #42115

    I just did a test. Passing datapoints and color with using viewbag the color setting successfully makes it to the chart. When passing datapoints and color with Ajax the color does not make it to the chart.

    in reply to: MVC Stacked Range #42113

    Beautiful. This is exactly the info I was hoping for.

    Thank you Manoj

    in reply to: Date on axis from C# MVC #42072

    I am just getting warmed up to canvasJS so forgive me if I am clunky in asking my question.

    I am trying to use this javascript example;

    var dps = [
      { x: new Date(2012,00,01), y: [new Date(2016, 1, 15, 8, 16, 15), new Date(2016, 1, 15, 9, 16, 15)] },  // y: [Low ,High]
      { x: new Date(2012,00,01), y: [new Date(2016, 1, 15, 11, 20, 15), new Date(2016, 1, 15, 13, 20, 15)] },
      { x: new Date(2012,02,01), y: [new Date(2016, 1, 15, 5, 16, 15), new Date(2016, 1, 15, 8, 30, 15)] },
      { x: new Date(2012,03,01), y: [new Date(2016, 1, 15, 4, 12, 15), new Date(2016, 1, 15, 12, 1, 15)] },
      { x: new Date(2012,04,01), y: [new Date(2016, 1, 15, 8, 16, 15), new Date(2016, 1, 15, 9, 00, 15)] },
      { x: new Date(2012,05,01), y: [new Date(2016, 1, 15, 7, 16, 15), new Date(2016, 1, 15, 10, 18, 15)] },
    ];

    formatted for c# MVC CONTROLLER;

    
               dataPoints.Add(new DataPoint(new DateTime(2012,00,01), new DateTime(2016, 1, 15, 8, 16, 15), new DateTime(2016, 1, 15, 9, 16, 15)));
                dataPoints.Add(new DataPoint(new DateTime(2012,00,02), new DateTime(2016, 1, 15, 11, 20, 15), new DateTime(2016, 1, 15, 13, 20, 15));
                dataPoints.Add(new DataPoint(new DateTime(2012,00,03), new DateTime(2016, 1, 15, 5, 16, 15), new DateTime(2016, 1, 15, 8, 30, 15));
    

    But the MVC version does not draw anything on the table. So I think my formatting is wrong.

    Any ideas of the correct C# formatting?

Viewing 5 posts - 16 through 20 (of 20 total)