score:2
Accepted answer
I wasn't really able to "solve" this per say. But what appears to be happening is the red bordered div is just slightly to small for the responsive chart to get to the appropriate size for that div width I think?
What I ended up doing is putting the charts (responsive mode on) in 2 bootstrap columns and it ended up doing the looking very nice.
<div id="circle_chart" class="col-md-5"><canvas></canvas></div>
<div id="chart_container" class="col-md-7"><canvas></canvas></div>
On window resize, I did end up calculating the height of circle_chart
and then adding a margin of 50% the height and subtracting that from the height of the chart_container
so that it was centered with the other graph.
$("#circle_chart").css("margin-top", (($("#chart_container").height()-$("#circle_chart").height())/2)+"px");
Source: stackoverflow.com
Related Query
- Responsive Chart.js Doughnut Chart with minimum height
- Chart.JS full-width, responsive doughnut chart with Bootstrap
- Chart.js HTML custom legend issues with doughnut chart
- Chartjs doughnut chart with gradient color
- React chart : prevent chart's canvas scaling with height and width
- Why would a ChartJS chart end up with width 0 and height 0?
- Keep chart.js doughnut with fixed width and height centered in container
- Vue Chart.js Doughnut Chart with rounded and spaced arcs (vue3-chart-v2)
- Vue Chart 3 - Doughnut Charts with Text in the Middle (Trouble registering a plugin)
- Create a arc like doughnut chart with Chart js plugins
- Doughnut Chart not displaying data with Chart Js and Backbone js
- Force ChartJS to show Doughnut chart with null values
- ChartJs - Round borders on a doughnut chart with multiple datasets
- Doughnut chart updates with twice the data
- Bar chart with min height and zero values - ChartJs
- Legend isnt moving to the right on my doughnut chart created with chart.js
- React with chart js, labelling problems in multiple datasets for doughnut chart
- HorizontalBar chart is displayed below canvas when I set height with style attribute for chart div (Chart.js 2.9.4)
- what is wrong with my code ? java script chart position
- Modify the legend of a double doughnut with chart js
- ng2-charts doughnut chart with different data per series
- How write the labels of the data inside a Doughnut Chart made with Chart.js?
- How to update css for doughnut chart with ng2-charts
- Is there a way to style multiple borders on Doughnut chart with Chart.js library?
- Trying to have Doughnut chart with dql result chartjs
- React js with react-chart js, does not render doughnut chart
- getting additional value fields from data source for dx.chartjs doughnut chart
- Chartjs - Doughnut chart with multi layer and running value
- How to display icon arc of doughnut chart with primeVue
- Chart.js: How to set minimum height of chart but still maintain aspect ratio?
More Query from same tag
- Chart.js compress vertical axis on barchart
- ChartJS 2.0 - Huddle labels on pie chart
- Create a line chart using an user input table from a data table in chart.js
- attempting to destroy previous graph on canvas
- Edit tooltips in ChartJS
- How to load chart data to an appended canvas
- What happened to generateLegend() in chartjs 3.0?
- How can I give the automatically generated y-axis values on bar charts in Chart.JS commas?
- Chart.js with Django - Using REST
- drawing line chart with chartjs
- How to put implement chart.js into an existing page django
- Add some Text Inside of the Tooltip
- Chart.js fix minimum axes?
- Showing labels on bubble chart in angular-charts
- Intersection point in line graph in Chart.js?
- Draw data in graphics generated by Chart JS
- Partitioning radar graph in chart.js by sector
- Modifying the X-Axis Labels of a Scatterplot in Chart.js 2
- using ajax populate dynamic piechart from chartjs
- Mark X value on Chart Js graph
- Why would a ChartJS chart end up with width 0 and height 0?
- Custom scatter chart extended from scatter chart becomes line chart
- Vue grouping items by key then charting similar keys in one chart
- Chart.js Globally Formatted Number Labels
- ChartJS incorrect plot when plotting multiple line charts in one graph
- How to make the chart smaller than its container
- ng2-charts - Tolltip color dont match line color
- Is there a way to change the react-chart-js tooltip only on a graph?
- chart.js Is there way to color line chart ticks depending on value
- JSON Data Assigning to Javascript Var Value