Using this property you can define whether to render indexLabel “inside” or “outside” the dataPoint.
var chart = new CanvasJS.Chart("container", { . . data: [{ dataPoints: [ { x: 10, y: 10, indexLabel: "label1", indexLabelPlacement: "inside" }, ], }, ] . . }); chart.render();
Also See:
Comments 4
Server Side Technologies |
Front End Technologies |
Contact |
|
---|---|---|---|
ASP.NET MVC Charts | JavaScript Charts | FAQs | |
PHP Charts | jQuery Charts | Sales Enquiries | |
Spring MVC Charts | React Charts | Support Forum | |
JSP Charts | Angular Charts | Careers | |
JavaScript StockCharts | |||
Privacy Policy © fenopix
Hi I have a unique prob,
I want to place the label on top of the datapoint so i have given indexLabelPlacement: “outside”.
According to my req i have like 22em height for my map.I works fine for normal data. But in one case
two column graphs one is 0 the other is 94.. the index label though placed outside is pushed inside at the top end can anyone tell why this is happening and how to fix this.
Thanks in Advance
Whenever the label is placed on top of dataPoint, it gets pushed down if there is no space left at the top. You can overcome this issue by increasing the axisY’s maximum such that there is enough space for labels.
how to apply bar chart colour by x value eg: if x is 1 then the color is red, if x is 2 the color is blue etc
In this case you can assign corresponding color using a loop. Please refer this example.