score:1
Accepted answer
okay i think i've figured it out and it's hilariously simple, i printed the object imported from chartjs-plugin-downsample
and it came out looking suspiciously like the thing you're meant to pass to the plugin service.
so the way to do this is:
import { chart } from 'react-chartjs-2';
import downsampleplugin from 'chartjs-plugin-downsample';
...(component declaration)...
componentwillmount() {
chart.plugins.register(downsampleplugin);
}
...(rest of your component)...
and then just play around with the options. make sure to set your min
and max
options, i've had it do weird things otherwise.
Source: stackoverflow.com
Related Query
- How to reduce the number of data points displayed in react-chart-js2 (data decimation)
- How to reduce the number of points shown on line chartjs chart with a large dataset?
- chart js tooltip how to control the data that show
- Chart JS show multiple data points for the same label
- How do I change the 'months' language displayed on the date axis in Chart JS?
- React ChartJS 2 : Get data on clicking the chart
- How to show only the data points that have a change in Chartjs?
- How can I display the xAxes and yAxes data in the tooltip, Chart JS?
- Angular chart how to show the legend data value by default along with legend name
- How to limit number of displayed points in chart.js?
- How to commaize the data values provided to a chart in Chart.JS?
- How can I achieve displaying data points on chart but Dotted? Chart.js V3.7.0
- Chart is too big. How can I reduce size for the chart in vue js?
- How to get chart from data points (arrays) with inconsistent time intervals and chart.js?
- How do I customize y-axis labels and randomly pick the value from the data range for x-axis in Chart js
- How to reuse a Chartjs Chart component in with different Data and get past the **Canvas is already in use** error?
- How to clear/destroy Chart.js canvas when the chart is represented as a react JSX element
- How to set the gap between data items in a chartjs chart
- How to show tooltip value of all data falling on the same axis in chart js?
- How to properly feed data to ChartJS with different number of x(labels) and y(data) points
- How to get the data attribute of the canvas chart created using chartjs
- How to show the chartjs bar chart data values labels as text?
- Using number/text input field to set the data values in ChartJs stops the chart from being displayed
- In reactjs doughnut chart, How to reduce the width of the chart
- How to stop displaying the data values from different data objects on Chart JS 2.x?
- How can I reduce the spacing between my legend and chart proper in my Chart.JS bar chart, and increase it in the graph area?
- How to plot a line chart which has both the start and points outside the canvas area using Chart.js
- How write the labels of the data inside a Doughnut Chart made with Chart.js?
- How to start the chart from specific time and offest hour and then show the data on chart from target datetime in chartjs
- How to set the number of of rows in a line chart in chart.js?
More Query from same tag
- Object list into chart labels not working
- Trying to have Doughnut chart with dql result chartjs
- Showing Percentage and Total In stacked Bar Chart of chart.js
- How To get keys(index) of collection in laravel
- Setting Common labels and background color common for all the charts in ChartJs
- Chart for Real time data with duplicate x axis
- How to remove excess lines on X axis using chartjs?
- Vue watch not noticing changes on component prop
- How to hide the labels of graphs that are not toggled in ChartJS
- Django show Graphs with ChartJS
- Django chart.js multi axis line chart
- Disable or hide YAixs of chart in chartJs
- How to add labels for only some of the data point?
- Get data from dynamic ID for Chart.js
- chart.js load totally new data
- What is the order in which the hooks (plugins) of Chart.js are executed?
- Artefacts when showing compact vertical bar chart in chart.js
- Is there a way to give a pie chart in chart.js a different color outer border than the border color between segments?
- How to get data from JSON ReactJs
- Chart.js V2.7.2 How to make Horizontal scroll bar without loosing Y-Axis
- Chartjs doughnut chart for conditional data
- Chartjs break line for axes tick labels text
- How to fix bars in Chart.js with long labels
- Chart.js mixed chart : Lines not starting at zero
- Bar chart with two sets of labels in Quickchart
- How can I create a long tail chart with chart.js
- Chart.js: Some sectors not showing if difference is too big
- setInterval on myDoughnut animation
- Display php array data in chart.js javascript
- My for loop does not iterate in Javascript