score:9
Accepted answer
labels
property must be defined along with values. According to documentation for properties:
labels (?Array) - x axis labels. It's necessary for charts: line, bar and radar.
So specifying actual values for labels will do the trick.
score:1
You need to put a condition inside the canvas, e.g., show it when the data is loaded or your array.length > 0
Example:
<canvas baseChart *ngIf="showMyChart" [datasets]="_numbers"
[chartType]="_chartType" width="600px">
</canvas>
Source: stackoverflow.com
Related Query
- Ng2-Charts Linechart only showing first 2 two values
- Charts js only showing 2 data points on sparkline
- Only first value added gets displayed in ng2-chart linechart
- Charts js showing only when positives data
- How to show tooltip only for show x values in react charts
- Chartsjs only showing two data points
- Tooltips on multiple charts in chart.js showing the wrong values
- line chart with {x, y} point data displays only 2 values
- Chartjs linechart with only one point - how to center
- chartjs + Angular6 is not showing charts or any error
- Bootstrap modal showing when clicking individual points in Linechart but not in individual bars in Barchart
- Chartjs: how to show only max and min values on y-axis
- Charts js not showing
- Chart.js LineChart how to show only part of dataset and support horizontal scrolling
- Chart.js two Y-Axis, one with negative values
- Chart JS: Ignoring x values and putting point data on first available labels
- Chart.js tooltip values display in two lines
- ChartJS 3+ x-axis only showing full moment object instead of just month
- Chart js logarithmic line chart showing NaN values instead of null
- chart.js: issue with concatening two line charts
- How to retain spacing between bars for two different bar charts in Chart.js 2
- Charts not showing in wicked pdf
- Chart.js - Bar values showing on the middle of bar
- Chart only prints out first value using jquery ajax php
- ng2-charts - bar chart, showing only one color
- How to create two pie charts using Chart.js API?
- Chart.js data values from textbox input only load once
- Only 1 out of 2 ChartJS i showing
- Chartjs only showing dots, line not showing
- First point on scatter plot on JavaScript chart.js not showing
More Query from same tag
- Chart looks only grey, does not show the color - Chartjs,discordjs
- dynamic charts using chart.js
- How to change z-index of chart js tooltip?
- Chart.js multiTooltip labels
- ChartJs chart won't update new values
- How to correctly passed php mysql data to ChartJs
- Parsing values from external JSON file with Chart.js
- Save data from REST API Get method and use it one more time
- Chartjs chart with only one axis
- Add padding between two y-axis scales using chart.js
- Create a line chart using an user input table from a data table in chart.js
- How to show gradient vertically on chart js grouped bar chart?
- Chart.js showing different graphs with select
- Adjust appearance of tooltip in lien chart rendered by Chart.js
- ChartJS v2 - Keep tooltip open when user click on a point of a multiple lines chart
- ChartJS - how to display line chart with single element as a line? (not as a dot)
- Border behind grid line
- React JS Chart JS 2 is not hiding the grid lines in the background
- Unable to change default values in chart.js
- ChartJS x axis title not visible when axis position is centered
- Fit outlabels to canvas and use different colors chartjs
- How remove duplicates xAxis labels and show all values on chart
- chart.js pie chart - how to update dataset with smooth transition
- How to make the chart smaller than its container
- Custom data position on the doughnut chart in chart.js
- Uncaught ReferenceError: require is not defined using react-chartjs.min.js
- ChartJS doesn't draw the chart
- Chart.js bar chart mouse hovering highlights all the datasets instead of just the selected one
- ChartJS legend background color while using point styles
- Chart js not showing negative y axis