score:0
Accepted answer
The chart is not visible because the component host is an inline
element. As such, it should not contain block elements like the div
wrapper created by the Chart.js
library.
Setting the display
style attribute of the host to block
or inline-block
will make the chart visible:
:host {
display: inline-block;
}
See this stackblitz for a demo.
Source: stackoverflow.com
Related Query
- Chart.js sets canvas dimentions to 0x0 and do not display anything
- canvas does not display proper width and height chart.js
- Resetting transform: rotate() by removing and appending canvas not showing data after appending and redrawing chart
- I am using chart js to draw a chart. I did everything right but i don't know why the x axis and y axis label is not comming in chart. code below
- Chart.js returns a console error and does not display the chart when using variables as data input
- Chart.js: bar chart first bar and last bar not displaying in full
- ChartJS canvas not displaying rgba colors in IE, Safari and Firefox
- Problem for display a chart with Chart.js and Angular
- ChartJS with AngularJS - Canvas won't display anything
- Can Chart.js combines Line Chart and Bar Chart in one canvas
- Chart.js: width and height of a pie chart not respected
- Chartjs not rendering chart and no error thrown
- Chart.js pie chart not showing in Google Chrome canvas
- How can I display the xAxes and yAxes data in the tooltip, Chart JS?
- Take image of a chart.js from canvas and display it as an image
- React chart : prevent chart's canvas scaling with height and width
- Chart.js chart does not display when inside an ngIf.
- Chart.js Date and Time Bar Chart Not Rendering - Line Works Though
- Angular2 and ng2-charts does not display any graph
- Chart.js and EJS: Display String, Not Calculation Result
- Doughnut Chart not displaying data with Chart Js and Backbone js
- how to display multiple sum with chart js and laravel?
- Chart JS - Grid colors and gradient fill not showing
- chart js and json, chart not showing up
- Datalabels of Chart JS can not display full values
- VueJs and ChartJs - Chart is responsive in width, but not height?
- Chart not rendering with pug/jade and nodejs
- Chart does not display on webpage in Django app (with Chart.js)
- Chart.js canvas and chart width gets overwritten when redrawn
- Unable to set width and height on canvas in chart js
More Query from same tag
- ChartJS Only Show Large Font Size for a Specific Tick
- data in charts of charts.js is changing when I click in the line chart
- how to filter year from datefield in django
- Pass Ajax response array to Chart.js
- chartjs with local dates
- Display Doughnut Pie Chart As Circle Progress Chart.js
- How to generate PDF with Chart.js
- How do I remove the ticks or inner circles of my polar area chart Chart.js
- Using a prepared dataset in chart.js
- Is there a way to implement chart-js-plugin-waterfall as a react component
- How can I pass my sqlite data to django, and make chart?
- Using ChartJS and JSON to render charts; Appending JSON Data to javascript yields an empty object in console.log
- X-axis of Chart.js not taking type : 'time'
- Chart.js tooltip hover customization for mixed chart
- chart.js on animation end callback
- How to write a query to get the number of times a choice is selected by users
- Chart.js chart appears and disappears on form submit
- Chart.js and react-chartjs-2 property translate is missing type
- Is it possible to fill particular portion between given start & end angle in pie chart in chart.js?
- Setting Common labels and background color common for all the charts in ChartJs
- How to plot date/time on X but display only dates in Chart.js?
- chartjs-plugin-datalabels not showing on stacked horizontal bar
- Why is borderColor function in chartjs running multiple times, and how to reduce it?
- Why is here a number?
- JS import updated JSON file for use with ChartJS
- ChartJS - Uncaught SyntaxError: Unexpected number
- how to put "%" in chart pie (chartjs)
- Charts.js how to have 2 different size y-axis
- How to change the z order of a chartjs polar chart
- Dynamically add charts with chart.js