Home › forums › Using CanvasJS › Custom CSS on Index Label
Tagged: Bar Chart, index label
This topic contains 3 replies, has 2 voices, and was last updated by Vishwas R 1 year, 3 months ago.
Can ypu please help me how to apply custom css in index label or some element. As of now i have used bar chart and index label goes inside to bar chart which is not needed . Please help …
Applying custom CSS to indexLabel is not available as of now, but you can customize toolTip either by using contentFormatter or by over-riding toolTip class as shown in this jsfiddle.
In bar/column charts, indexLabels are placed inside or outside based on the available space. You can set indexLabelPlacement in dataSeries level to outside so that indexLabels are shown outside the bar.
Thanks for your reply. Is there any way to extend the functionality of charts from outside like updating prototype to enhance the functionality so it would be very helpful because sometime we need to add functionality which is not available for now.
We don’t have plugin architecture within the product as of now. However you can add custom DOM elements on top of chart and customize it the way you want. Please take a look at this jsfiddle. Also refer Position Image over Chart for tutorial on positioning DOM on chart.
You must be logged in to reply to this topic.