Category "chart.js"

Setting ChartJS plugin on vue-chartjs not working

I am trying to change the canvas background color of my ChartJS chart to export it as an image but it has a black background. I've tried the workaround from the

Chart.js 3.x migration problem – thin white border / padding appears around chart on first load

I'm using Chart.js with a React wrapper (react-chartjs-2). I want to upgrade to the latest major version of Chart.js (3.x) to remove the dependency on moment, a

Cannot rotate label in chart js annotations plugin

I am using chart js annotations plugin in Bar Chart. I am trying to rotate the label to align it vertically with the bar but it is not working. Can anyone pleas

Creating chart.js chart directly to PNG in Node js?

Is there any way I could use Chart.js to create a bar chart directly to a PNG file? I don't want to display the chart on my webpage, I want to send it directly

how do I use for loop inside script tag in ejs

I try to draw chart, using chart.js. To get my data, I try to use ejs tags for example, in ejs I input html like this, and it works well. <p>date

Line chart is showing under bar in combochart in chartjs

I am using combo chart using chart.js in my website. The problem I am facing is the line disappears when it meets the bar. I think it is because the line chart

How to hide radar chart index labels (chart.js)

I'm trying to make a radar chart with a dark background. White index labels distract from the chart itself. (my chart) I found a thread that raised a question a

Not able to plot voltages graph (v1 vs v2) in a website using esp32 and arduino

I have started learning to build some good websites. In one of my projects, I wanted to display two voltages (named "POTvalue1" & "POTvalue2") on a website.

The engine “node” is incompatible with this module when installing React-chartjs-2 Chart.js,

I am creating a doughnut chart by using chart.js with its react wrapper. It's working fine in the new project, but not able to install it in the main project. B

Chart.js error Cannot read property 'length' of null

I am using Chart.js via an ajax call $.ajax({ url: 'MenuG.aspx/GetGraphData', type: "POST", data: "{}", dataType:

How Refresh chart js data with same variable name

I am facing an issue while refreshing the data using the same variable. Every time data get changed in a variable(mydata) but after an update the chart loaded w

Chart.js add direction arrows to the X and Y axes

I'm trying to add/draw arrows to the axis of my charts. (So they can look a bit more like that) I've tried to look into the doc, but I didn't find any options c

ChartJS tooltip position / placement

When I hover on point of my line chart I can see tooltip. Unfortunatelly the tooltip position is left or right by default. This is how it looks now -> actual

Plot a Line chart using Chart.js with CSV Data

I need to plot a simple line chart using the chart.js library from CSV data, which is in the following format: data.csv "year","rate" 1952-53,3.00% 1953-54,3.00

Blazor.ChartJs Mouse Click Handler not working correctly

I am writing a Blazor app using the ChartJs Blazor (Blazor.ChartJs.Fork 2.0.2) library. I am creating a bar chart with a need to determine on which bar the user

Changing line color below specific value in Chart.js

I am trying to color the line below a specific value a certain color. I am using Chart.js v3.7.1 I have implemented the solution found in this answer with parti

Chart.js V2: Add prefix or suffix to tooltip label

In Chart.js V1.0, I would add tooltipTemplate: "<%if (label){%><%=label %>: <%}%><%= '€' + value %>" to add a euro symbol as prefix

Charts.js how to set zero-value on axis?

I'm trying to implement a horizontal bar chart with Charts.js (sample page) Standard behavior is, that the bars split at the "mirror line" at "0" See image How

How could I skip drawing empty/zero value and its value on tooltip

I want to skip some points with zero value on line chart of chartjs. How could I do it ? expected result sampledata :labels => [ [ 0] "10/01

custom tooltips with react-chartjs-2 library

I am having issue with the default tooltip that chartjs provides as I can not add html inside the tooltips. I had been looking at how i can add the html/jsx ins