Skip to content

Tag: chart.js

Limit chart.js X axis ticks

I’m trying to limit the amount of X ticks displayed on the ChartJS config, but it keeps ignoring the setup. Although I checked other posts, it seems to be some minor differences in the property name and property depth for the maxTicksLimit Maybe the property name is incorrect? Answer This is because you…

How to separete chart series into different pane (Chart.js)

I’m working on ASP.NET project (.NET Framework 4.0) and using Chart.js (version 3.5.0) to create chart from data. In this chart, the x axis is month of the year and y axis is for the data value. Because there are 2 series with different unit of value so I want the series to be in different pane as shown…

JavaScript function based on counter

I have a chartJS graph. What I am trying to do is to enlarge the section of my graph when a segment of the pie chart is selected. Then decrease it when another section is selected. I am able to increase the section by the following (this works): if you imagine a pie chart I want to select a segment

chartjs 3.6.0 add X label

I used following code in Chart 2.2.1 and it worked well and we can see label Time. Now we want to upgrade to 3.6.0 due to security reasons, but snippet stopped working. I attach 2 fiddles Working 2.2.1: https://jsfiddle.net/maksim_beliaev/2ru3g5ot/8/ Not working 3.6.0: https://jsfiddle.net/maksim_beliaev/q2po…