Skip to content
Advertisement

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 are using V2 of chart.js while using

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 in

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

Generate an indefinite number of charts as images (chart.js)

I would like to generate several “line charts” as an image file. For this purpose, data is requested from a database. This data is transferred to the function for chart generation separately for each line chart. At the “console.log” output at the beginning of the function, the transferred data is correctly displayed. If I query the same output of the

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/q2poncyd/5/ How can I set label for X and Y axis with new chartjs? In online docs for

Advertisement