12,369 questions
0
votes
1
answer
20
views
Remove Spacing from the bars for Q1 and Q2 I am using chartjs version 2.7.2 and angular chart js version 1
In your Chart.js bar chart, experiencing unwanted spacing between the labels Q1 and Q2 when the corresponding data values are 0. Even though the bars with 0 values are not visually displayed, Chart....
0
votes
1
answer
37
views
How to modify the legend of Bar Chart [closed]
I am using chartjs with react
import { Chart,Line,Bar,Pie } from 'react-chartjs-2';
var data = {
options: {
legend: {
position : 'right',
},
title:{
...
0
votes
0
answers
23
views
Migration to Angular v17 with ng2 charts v2
I'm working on migration of Angular 14 project to Angular 17. One of the main obstacles is that the app has some ng2 charts that are version 2 which is not compatible with newer versions of Angular. ...
-1
votes
0
answers
31
views
"Cannot set properties of undefined" - Chart.js & React-Chartjs-2 on a Nextjs15.2.1 app deployed on vercel
I am currently working on an app that provides transtactional data to users via charts and tables. For this, I am using Nextjs15 and a combination of chart.js and react-chartjs-2. On development mode, ...
1
vote
1
answer
66
views
How can I change the color of the grid in this chart using Chart.js
Im trying to change the color of the grid lines since my background is dark. I have managed to change the color of the ticks, and the line itself. However I've been trying to change the grid color for ...
0
votes
1
answer
49
views
Line chart(ChartJs) with huge set of nested data, is freezing the screen. How to optimize it?
I'm building a line chart, where the line color and the background will change based on different conditions.
As line chart in chartjs dosen't support multi background color. So I nested the data from ...
1
vote
1
answer
30
views
How to optimize chart rendering using Chart.js in Ionic?
I'm building an expense manager application where I have a stats tab containing two subtabs, expenses and incomes each of which has its own chart instance. Rendering is first slow, it takes some ...
0
votes
0
answers
36
views
How to make the distance between the bottom label and the bottom the same as between the other labels [closed]
In Chart.js, how to make the distance between the bottom label and the bottom the same as between the other labels. The first picture is what I have, the second is how it should be.
const ...
0
votes
1
answer
37
views
Min. height for stacked bar chartjs
I've a vertically stacked bar chart in chart.js. Since the bars are being generated based on some userinput, it's possible that I get a chart that would look something like this:
I want to enforce a ...
1
vote
1
answer
37
views
How to listen to chartjs-plugin-zoom's events in another Chart.js plugin
I'm writing a custom plugin for Chart.js 4 and I want my plugin to behave well with the chartjs-plugin-zoom plugin.
In order to do this, I need to listen to the chartjs-plugin-zoom events (onZoomStart,...
1
vote
1
answer
58
views
How to restrict category type axis in chart.js to bottom of graph?
I use the R1, R2 and R3 labels in the bottom left corner to track the on-off state of some properties. I want them to be on the bottom of the graph just like they are here, but the way I solved this ...
2
votes
1
answer
57
views
chartjs 4.4 : not able to plot 2 time series in 1 graph
I have an issue with plotting 2 lines in 1 graph using chartjs: I get 2 graphs with 1 line in stead of 1 graph with 2 lines, and I think I made a very simpe error, but I can't find it. I have spend ...
0
votes
1
answer
51
views
EvoPdf not rendering chart from chart.js
I am using EvoPdf version 7.5. We have this html that has been used to generate a pdf report for quite some time with no issues, but its just straight up HTML and css, there was not javascript being ...
1
vote
1
answer
43
views
How to center the labels of a horizontal stacked bar chart in Chart.js?
I have created an horizontal stacked bar chart using Chart.js and Chartjs-plugin-datalabel. Here are the options I defined for the chart :
{
indexAxis: "y",
animation: false,
...
0
votes
1
answer
63
views
ChartJS realtime waveform getting mixed up when chrome tab swtiched back and forth
Am having a simple application that constantly gets waveform data and displayed in my browser (chrome), chart.js mode is set to realtime. It works well when the chrome browser tab stays on, even when ...