score:18
code in component is correct, issue was in html
wrapping the <canvas>
tag inside <div>
has solved the issue as said in comment by @quan vo
example:
<div><canvas id="canvas"></canvas></div>
why <canvas>
tag should be inside <div>
tag, for this one can refer this article
in short:
the html5 canvas element is an html tag similar to the <div>
, <a>
, or <table>
tag, with the exception that its contents are rendered with javascript. in order to leverage the html5 canvas, we'll need to place the canvas tag somewhere inside the html document, access the canvas tag with javascript, create a context, and then utilize the html5 canvas api to draw visualizations.
Source: stackoverflow.com
Related Query
- chartjs + Angular6 is not showing charts or any error
- Angular6 and ng2-charts does not display any charts when i fill data from webservice
- 'require is not defined' error when attempting to use chartjs in javascript code
- Angular charts not working with Angular 5, Showing below error attached screen shot
- Chartjs is not showing charts in my Django project
- ChartJs title not showing
- react-chartjs-2 with chartJs 3: Error "arc" is not a registered element
- TimeSeries scale in ChartJS 3.0.2. brings error "This method is not implemented: either no adapter can be found or an incomplete integration was ..."
- Charts js not showing
- ChartJS bar not showing up for simple data points
- Chartjs not rendering chart and no error thrown
- Chartjs Graph is not showing in colorbox
- Chartjs bar dataset label not showing
- ChartJS charts not generating within tabs
- ChartJS / MomentJS - Unable to remove deprecation warning. Graph not showing in firefox/opera
- ChartJS do not render any legend if the label is falsy
- showing tooltips all the time in chartjs 2.4 not working
- chartjs plugin datalabels does not show value on charts
- Charts not showing in wicked pdf
- Chartjs not working with d3 from csv source
- Chartjs not showing all data points
- ChartJS : It's not showing in html on Django
- Chartjs does not show on pdf in yii2 despite showing in html view
- Chartjs only showing dots, line not showing
- ChartJS yAxis showing not coherent data
- ChartJS plot not showing as it should be when toggling a grouped legend element
- I am having this error in charts v3 chartjs-chart-treemap: fontColor does not exist in type 'ChartDataset<"treemap", TreemapDataPoint[]>
- Scatter plot not showing anything chartjs needs some debugging
- Label is not showing in ChartJS
- ChartJS not showing data for time series bar chart
More Query from same tag
- Prevent scroll when calling update()
- Use chartjs-plugin-annotation 0.5.7 in Chartjs 2.9.x with React
- Chartjs: Make some ticks (Sunday, Saturday) red
- How to add legend on chart js annotation
- Reduce spacing between bars in horizontal bar chart (chart.js)
- Issue while plotting bar chart with custom x-axis with month and year in chart.js
- Create a pie chart with chartjs package in R
- How to expand the slice of donut chart in chartjs?
- chart js label not showing
- Pause horizontal scrolling in chart.js for real time data
- Limit labels number on Chart.js line chart
- Chartjs and Polymer 1.7.0
- React setState() not updating state when button clicked
- Wkhtmltopdf does not render Chart.JS 2.5.0 graph
- I want to show the value of label inside the pie graph. (vue-chartjs / pieceLabel)
- Charts not being displayed in django app when using Chart.js 3.6 version
- Add DataSet Bar Chart - Chart.JS
- Chart.js how to create chart wirhout y-axis for two data sets
- javascript count daily occurrencies from a datatable for the creation of a linechart
- How can I set the scale with alphabet on chartjs?
- React chartjs 2 - Type 'string' is not assignable to type '"timeseries"'
- Chartjs bar chart trying to get labels from datasets
- Dynamically add charts with chart.js
- Is there a way to change color of a chart's grid in y-axis - ng2-charts
- Is it possible to have tick stepSize for each dataset in Chart.js?
- Chart for Real time data with duplicate x axis
- Django and ChartJS
- using library without 'require' when using CDN
- How to add external scripts and css in latest angular-cli
- how to creat a dynamic datasets and new dynamic multi yAxes