score:3
The second issue in the comments
It is also showing an error that "Can't bind to 'datasets' since it isn't a known property of 'canvas'
is probably due to not importing ChartsModule into the module that is rendering the chart.
I had encountered the same initial issue and was able to get past it by adding the following to my rollup-config file
plugins: [
nodeResolve({jsnext: true, module: true}),
commonjs({
include: ['node_modules/rxjs/**','node_modules/ng2-charts/**'],
namedExports: {'node_modules/ng2-charts/ng2-charts.js': ['ChartsModule']}
}),
uglify()
]
The documentation for this library could have been better.
I hope the post can help anyone encountering similar issues
Source: stackoverflow.com
Related Query
- ng2-charts\ng2-charts.js does not export ChartsModule
- chartjs plugin datalabels does not show value on charts
- I am having this error in charts v3 chartjs-chart-treemap: fontColor does not exist in type 'ChartDataset<"treemap", TreemapDataPoint[]>
- Angular6 and ng2-charts does not display any charts when i fill data from webservice
- The dataset for bar graph is not set properly using ng2 charts and ng5-slider in Angular
- The dataset in ng2 charts for bar graph is not setting properly
- Chart.js canvas rendered by ng-repeat does not show charts
- Angular ChartJs does not show Data for multiple Charts
- how to not repeat code while creating multiple charts in chart js
- ng2 charts on Angular 9 not responsive
- Property 'getContext' does not exist on type 'HTMLElement'
- Bootstrap 3 tabs & Chart.js - charts not loading on tabs
- chartjs + Angular6 is not showing charts or any error
- Chart.js v2 charts do not display inside angular 2 (but Chart.js v1 works perfectly)
- Html chart does not fit a small Android WebView
- chartjs height does not follow parent container
- Chart looks only grey, does not show the color - Chartjs,discordjs
- Wkhtmltopdf does not render Chart.JS 2.5.0 graph
- Angular-chart.js - Make line chart does not curve
- Charts js not showing
- Vue Chart.js component does not render
- Multiple charts on same page not working - ng2-charts
- Chart.js Chart in Angular does not load until resizing browser window
- ChartJS charts not generating within tabs
- Why chart.js charts are not plotting data in Safari (works in Chrome)
- Angular2 charts (chart.js) Labels not vertical even though option is set
- How do I keep chart.js charts in one JS file, and not get errors when the ID from the JS file don't exist on one specific html page?
- Chart.js in AngularJS tabset does not render
- Chart.js click event to open a custom tooltip does not work sometimes
- charts are not being show with wicked_pdf
More Query from same tag
- Chart.js 2 - Axis Layer Padding
- Retrieving daily & monthly totals from MySQL for use in a chart
- Is it possible to make ChartJS X-Axis an automatic day based on data and formatted to month?
- Change Chartjs label color on click without losing hover
- How do I override the function convertTicksToLabels chartjs
- Change size of bubble radius without changing r value
- ReactJs issues with setstate on array in ChartJs
- Can individual bubbles in a chartjs bubble chart have labels?
- setting uneven tick stepsize spacing with chart.js
- How to load page containing Chart.js using jQuery
- Chart.js not being displayed inside Jquery Dialog
- load a graph with chart.js and react
- Creating Stacked chart.js graph from array
- Formatting Data With Charts.JS
- build a javascript callback function from php for chartjs
- How to change NaN values to 0 in Chart.js?
- How to remove square label from tooltip and make its information in one line?
- Chartjs inner separation
- Chart.js not working after Django deployment on Heroku
- Chart.js: One function for multiple graphs
- Charts.js scales yaxes ticks min max doesnt work
- How to stop axis label from being cut off in chart JS?
- Using Chart.js - Creating Legend for Doughnut Chart
- Edit tooltips in ChartJS
- How to use JSON data as chartjs data?
- How to display data values on bar graph (chart.js)?
- generateLegend() Chart.JS V2
- How can I create custom tooltips for each data point in a graph?
- First point on scatter plot on JavaScript chart.js not showing
- Chart.js: evenly distribute ticks when using maxTicksLimit