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 Editing The Code

  Also See:    


If you have any questions, please feel free to ask in our forums.Ask Question

2 Comments

  1. dinesh says:

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

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

If you have any questions, please feel free to ask in our forums. Ask Question