y: Number

Sets the y value of dataPoint. It determines the position of dataPoint on Y Axis. Values can be positive or Negative


Default: null
Example: 5, 20, -30 ..

Notes
  • one can plot chart with only y values. x values are set automatically.
  • no y value would mean an empty dataPoint.


var  chart =  new  CanvasJS.Chart("container",
{
 .
 .
 data: [{
  dataPoints: [
   { x:10, y: 5},
  ],

 },
]
 .
 .
});
chart.render();


Try it Yourself by Editing the Code below.

  Also See:    



In order to provide better support,we have closed the comments and switched completely to our Forums.
If you have any questions, please feel free to ask in our forums.

Comments 2

  1. How to text in y-axis in stackedColumn chart.
    my datapoint is like this

    {x:’2015-12-01 ‘, y: ‘run’}

In order to provide better support,we have closed the comments and switched completely to our Forums.
If you have any questions, please feel free to ask in our forums.