Composite Chart Not Rescaling Bar Width
See original GitHub issueI have been using the following to rescale bar widths when resizing a full-width chart, where width is assigned by the anchor set at 100% in CSS:
chart.on('preRender', function(){
chart.rescale();
});
$("#some-chart").on("resize", function(){
chart.render();
});
Which works perfectly if chart
is a bar chart. However, if the bar chart is part of a composition, where chart
is the composite chart, bar widths no longer rescale.
It seems that _chart.xAxisLength()
in calculateBarWidth
is not reflecting the new width.
Issue Analytics
- State:
- Created 9 years ago
- Comments:11 (8 by maintainers)
Top Results From Across the Web
Dynamic scaling & brush off composite charts dc js
I have a composite chart using dc js (line and bar chart). However, the scales are not dynamically changing as is the case...
Read more >dynamically resize the column thickness by dragging the cursor in a ...
Hi,. Is it possible to dynamically resize the bin(column\bar) thickness of a stacked column chart. I am using a composite chart comprising of...
Read more >Stacked bar chart — Matplotlib 3.6.2 documentation
This is an example of creating a stacked bar plot with error bars using bar . ... 3] width = 0.35 # the...
Read more >Google Charts Release Notes
You can load either the production or the release candidate (but not both at once), ... Now supports variable-width in bar, column, and...
Read more >Azure Monitor workbook grid visualizations - Microsoft Learn
Time range, The time window to view the log chart. ... If a value is present in the Custom Column Width field with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It’s almost two years late but it can be fixed if you assign the xAxisLength of the composite chart to the xAxisLength of the child bar charts:
childBarChart.xAxisLength = compositeChart.xAxisLength;
Fixed by #1365 in 3.1.5