563 questions
Score of 0
0 answers
68 views
How to add Image and text in data label and legend in pie chart?
I have created SPFx React project and integrate chart js library in that projecct
I have used "chart.js": "^3.3.2" version.
I need to add an image/icon in data labels and legends.
...
Score of 0
1 answer
109 views
How to display items without overlapping?
i'm trying to make reservation chart with using ChartJs in react.
const scheduleData = {
data: [
{
name: "testNameA",
title: "a teatment",
start: new Date(...
Score of 1
1 answer
185 views
Custom sorting of bars within x-axis groups
I'm hoping someone has figured out how to properly sort "datasets" within their clusters in a ChartJS Bar chart. Below is an example of a bar chart in ChartJS with multiple "datasets&...
Score of 0
1 answer
113 views
Chartjs using react - create viewport that slides along x axis, where x axis has a hard minimum and maximum
I'm trying to create and control a viewport where you can scroll left or right on a chart in chartjs, but havent been having any luck. I need the min and max X values to be a hard stop on the panning ...
Score of 0
1 answer
230 views
React Chart.js is not rendering lines when state changes
I am using React Chart.js V2 and I am trying to update my chart when the state changes. However it is only rendering the y-labels on the left side and is not drawing the lines. The dataset and label ...
Score of 0
1 answer
78 views
React Google tags tooltip show numbers in western system
import React from "react"; import { Chart } from "react-google-charts"; class BarChart extends React.Component { convertDataToChartData = (data) => { var modified_data = []; if ...
Score of 0
1 answer
165 views
Why is there a 1px gap between the background fill and the canvas edge in my Chart.js line chart?
I'm using Chart.js and react-to create a line chart, but I've noticed a small issue with the background fill. The line chart extends to the edges of the canvas as expected, but the background fill ...
Score of 0
1 answer
165 views
React Chart Js 2 , x axes value not my value
i try formatting my x axis value in chart js
myData
const chartData = {
labels: data.map(item => item.toString()),
datasets: [
{
label: '',
...
Score of 1
1 answer
292 views
Chart.js - X-axis not displaying dates with timestamps in format "YYYY-MM-DDTHH:mm:ss.SSSSSS" (React chartjs-2)
I'm trying to create a line chart in React using chartjs-2 to visualize timestamps and their corresponding power measurements. My timestamps are in the format "YYYY-MM-DDTHH:mm:ss.SSSSSS" (...
Score of 0
1 answer
110 views
how can i show state label in react google geo chart in US region
<Chart
chartEvents={[
{
eventName: "select",
callback: ({ chartWrapper }) => {
const chart = chartWrapper.getChart();
const ...
Score of 2
1 answer
213 views
How do I make the line start at the middle instead of the beginning of the column?
I'm creating a line chart using chartjs (v3) (and react-chartjs to integrate) and I'm having some bad times to customize the line to start at the middle of the first column (and also finishes at the ...
Score of 0
1 answer
45 views
React Chart js breaks labels when zoom
We currently have a zoom rule for small screens. It applies a zoom to 80%.
But this is breaking the Pie Graph from chart.js.
When we are using large screens, which the page zoom is 100%, we can select ...
Score of 2
1 answer
111 views
ChartJS: Grouped Stacked Bar Chart rendering incorrectly
I am trying to use ChartJS to create a grouped stacked bar chart. In my dataset, there are 2 groups: Groups A and Groups B. Groups A are rendered out correctly, but for some reason, Groups B (gray ...
Score of 0
1 answer
130 views
Chartjs react initially hidden LegendItems
how can I set {hidden:true} on all LegendItems? If I set hidden property to true the legend item is only striked-through but the graph is still displayed. Any ideas?
Thank you!
I already tried this:
...
Score of 0
0 answers
196 views
How to make a bar chart in React Js with custom bar component?
I am trying to create a height comparison chart where I want to display the SVG's of kids, men and women based on height instead of bar. But, sometimes, my SVG does not appear completely on the chart ...