score:1
detecting when the canvas size changes can not be done directly from the canvas element. chart.js uses its parent container to update the canvas render and display sizes. however, this method requires the container to be relatively positioned and dedicated to the chart canvas only. responsiveness can then be achieved by setting relative values for the container size
source :http://www.chartjs.org/docs/latest/general/responsive.html
score:3
give mychart
a fixed width, like:
<div id="mychart" style="width:200px;"></div>
it works for me.
Source: stackoverflow.com
Related Query
- responsive = false not working
- AutoSkip: False not working on time xAxes labels
- code works fine on jsfiddle but one function is not working on website
- Chartjs not working with d3 from csv source
- Chart.js Example Code not working
- Using CSS variables (color) with chart.js - "var(--primaryColor)" not working
- Chart.js responsive option - Chart not filling container
- Bootstrap grid not working with canvas
- Chart.js not height responsive
- Angular chart.js onClick is not working - how to get all elements of a bar when it is clicked on
- Chart.js tooltipTemplate not working
- Adding options to vue-chartjs seems not working
- Multiple charts on same page not working - ng2-charts
- Time Series Line chart js in react not working
- ChartJS multiple tooltip callbacks not working
- Click event of stacked line chart not working
- chartjs-plugin-zoom not working with my React project
- showing tooltips all the time in chartjs 2.4 not working
- ChartJS - radar chart options not working
- Bubble Chart in Chartjs not working
- Android: WebView with JavaScript for Chart.js not working properly
- Chart.js not working on my page?
- Multiple charts not working chart.js
- Css style not working well when resizing chart height in angular application
- Chart.js "minBarLength" not working as intended?
- Chart.js stepSize not working with min
- zeroLineColor and zeroLineWidth not working for the x-axis in Chartjs
- yAxes not working with min max option
- React-chartjs not working
- Why is chart.js not working with angular JS
More Query from same tag
- Bar charts flickering issue in charts js
- Tooltip vertically off with overlapping data, in ChartJS
- Callback for v-show in vue.js
- chartjs-plugin-datalabels not showing on stacked horizontal bar
- ChartJS - How can I skip certain minutes on the X-Axis
- Chart.js - Tooltips overlapped by bar values
- Chart JS: Bar Chart to have min Length as value range is too big
- Add text before time in tooltip
- How to implement doughnut ChartJS with CodeIgniter 3 and display data from database
- How to make labels clickable in angular-chart
- chart annotations not showing in Angular 2
- Programmatically creating labels for Chart.js in angular?
- Parsing JSON data into Chart.js bar chart
- How to add Canvas tag inside repeater
- Chart Js invisible horizontal bar
- Chart.js bar chart barWidth is Inconsistent
- How to create a chart.js scatter chart with data from two lists
- How to add an end line to my graph using Chart.js?
- Primeng line chart not updating automatically,only update on window refresh
- Charts.js - Colors for stacked bar on multi-series line/bar chart are not working
- yAxis control for stacked bar chart
- Chart.js v2 hide dataset labels
- Align rotated text to left of canvas
- Last value not showing in bar graph of charts.js-library
- Chart with Time axis only displaying first grid line and tick label (unitStepSize)
- How do I remove CSS code arriving in my webpage?
- How to add a Date Selector to Chartjs in the context of Vue.js
- Extend chart.js in PHP heredoc causes parse error
- how can i reset chartjs object all instances and recreate it from scratch?
- Sending 2 fetched result into AJAX