Forum Replies Created by dpanscik

Viewing 8 posts - 1 through 8 (of 8 total)
  • in reply to: Read extra data sent in the AJAX JSON string #42211

    Thank you Manoj

    Your syntax didnt get me there but helped by giving me some more options to try. I suspect your solution needs to be placed in a exact location of the chart’s functions for it to work.

    This is what I would up with that is working by placing at the end of the function: function addData(data){}

    pageName = dataPoints[0].extraData;
    alertMessage = dataPoints[1].extraData;

    in reply to: Change color of Vertical Grid Line #42189

    I have the stripline label coming in on a JQUERY datapoint named stripLineLabel

    I am trying to figure out how to use this syntax can you help?

                        stripLines: [
                            {
    
                                startValue: centerLine-43200000,
    			    endValue: centerLine + 43200000,
    			    thickness: 2,
                                color: "#555555",
                                label: "Today: " + dataPoint.stripLineLabel[0],
                                labelFontColor: "#a8a8a8"
                            }]
    in reply to: stacked rangebar order by date #42177

    stacked stacked rangebar and sorting seems to be an issue.

    I couldnt get sorting working with stacked rangebar.

    I decided instead to do the sorting within the MVC controller before pushing the data to the chart.

    Problem solved.

    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 8 posts - 1 through 8 (of 8 total)