react-chartjs-2

Issue with chartjs linear gradient for the mixed bar chart in ReactJS is not calculated for each individual Bars

…衆ロ難τιáo~ 提交于 2021-02-10 14:39:04
问题 Our requirement is to render the bar chart as Expected Image. we are using chartJs library to render the chart. we are able to render the bar chart but for one of the bar we need to show the background color as gradient. To achieve this we used the following below code snippet: but it render as Rendered graph. Can you please help me out in rendering the chart as expected. JSFiddleLink const data = [{ type: "Sample 1", data: [600, 400, 200, 800] }, { type: "Sampel 2", data: [700, 300, 600, 600

How to make labels on both side from horizontal bar chart js

…衆ロ難τιáo~ 提交于 2021-01-29 05:13:56
问题 I want to make side labels for double horizontal bar on both side like this: pic 1, pic 2 can someone help me idk how to do it, im new in react and chartjs this post continued from: How to make multiple horizontal bar chartjs here's what i code: this the data: data for chart export const dataPasienKeluarMasuk = { type: 'bar', labels: [ [0, 1, 2, 3,4], // expect output 0 - 4 [5, 6, 7, 8, 9], // expect output 5 - 9 [10, 14], // ext.. [15, 19], [20, 24], [25, 29], [30, 34], ], datasets: [ {

Using react-pdf with react-chartjs-2 to generate a pdf

只愿长相守 提交于 2021-01-05 11:32:15
问题 I've looked around quite a bit but I can't seem to find any examples of the use of these 2 libraries together. My project currently uses react-pdf to generate pdf reports but I need to add chartjs charts to some of the new files we'll be generating. I would prefer not to have to use two different pdf libraries and have to re-code parts of the application to match 2 standards. If there is a different library that can get the job done I would be open to suggestions. The page I am trying to