I have a bar chart (http://tributary.io/inlet/4720197) that plots a dataset with a large number of points that I can't get to fill the entire width of the svg. I had the same issue with a line chart and was able to resolve by using rangePoints.
I've been attempting something similar with this chart but can't quite get the right combination (it's using two scales for the grouping) and am unclear how to get the side-by-side bars that I previously accomplished with rangeBand() given that function does not exist with rangePoints. What am I missing?
Related
I am trying to create a composite chart and my requirements are to draw a bar chart, a line chart and a dotted line chart. For that I draw a composite chart. Now I am having problem that points of line chart starts from start of bar chart, but I need that to start from center of line.
You can see the problem in this JSFiddle.
I got some help from Stackoverflow that is:
Align points in centre of bars (DC.JS composite chart)
Seems like a workaround is to assign ._rangeBandPadding(1) the composite chart. Though as mentioned in the github thread that breaks the bar sizes, so adding .gap(1) and .centerBar(true) to the bar chart got everything looking nice.
but after that I got this output
[http://jsfiddle.net/nauman3128/nr0rgzvc/9/][2]
I can't explain why this works, but with some odd combination of range bands and old-style .gap(1), I was able to get it to draw properly.
The trick is
._rangeBandPadding(1)
on the composite chart, and
.gap(1)
.centerBar(true)
on the child bar chart, pretty much as stated in the original question. So this is essentially a duplicate of the earlier question and answer, but I've applied it to your JSFiddle in this fork:
http://jsfiddle.net/gordonwoodhull/nr0rgzvc/22/
Also, it's important not to set barPadding for the child bar chart. So we are using range-band layout for the composite, and classic gap-padding for the bar chart, which sounds like a very bad idea... but the output looks okay!
I am trying to create a composite chart and my requirements are to draw a bar chart, a line chart and a dotted line chart. For that I draw a composite chart. Now I am having problem that points of line chart starts from start of bar chart, but I need that to start from center of line.
You can see the problem in this JSFiddle.
I got some help from Stackoverflow that is:
Align points in centre of bars (DC.JS composite chart)
Seems like a workaround is to assign ._rangeBandPadding(1) the composite chart. Though as mentioned in the github thread that breaks the bar sizes, so adding .gap(1) and .centerBar(true) to the bar chart got everything looking nice.
but after that I got this output
[http://jsfiddle.net/nauman3128/nr0rgzvc/9/][2]
I can't explain why this works, but with some odd combination of range bands and old-style .gap(1), I was able to get it to draw properly.
The trick is
._rangeBandPadding(1)
on the composite chart, and
.gap(1)
.centerBar(true)
on the child bar chart, pretty much as stated in the original question. So this is essentially a duplicate of the earlier question and answer, but I've applied it to your JSFiddle in this fork:
http://jsfiddle.net/gordonwoodhull/nr0rgzvc/22/
Also, it's important not to set barPadding for the child bar chart. So we are using range-band layout for the composite, and classic gap-padding for the bar chart, which sounds like a very bad idea... but the output looks okay!
I would like to generate a stacked bar chart (similar to http://bl.ocks.org/mbostock/1134768) where the total height of each bar is the same and the width varies. This kind of chart is also known as Marimekko chart.
So far my attempts to make the width vary based on a value in the csv file have failed.
Any suggestions would be appreciated.
The Marimekko chart at http://bl.ocks.org/mbostock/1005090 is what I was looking for.
-Office for Mac. I have the following Bubble chart :
I would like to insert a small Pie figure inside each of these bubbles to represent a specific value. How is this possible through Excel ?
The basic method you can use is to create pie charts for each bubble, modify the formatting of the pie charts to eliminate everything but the pies from view (turn off borders, any text labeling, backgrounds, etc.), and resize and overlay the pies over the corresponding bubble. After you've done all the bubbles, you may want to group all the elements together to avoid inadvertent misalignment of the overlays.
I have a pie chart which is being generated from a json string. The pie is getting created correctly but what is happening is the tooltip is getting cutoff when the text to be displayed in the tooltip is large. I have tried increasing the width and height of the svg area. But the charts are generated dynamically so i have no way of setting the chart widht and height dynamically depending on the content.
One can adjust the margins margin:[0,100,0,100], to shrink the pie chart so that the tooltips/labels will appear. This has been set to automatically scale the chart in Highcharts 3.0.
http://www.highcharts.com/component/content/article/2-news/53-highcharts-3-0-beta-released
http://github.highcharts.com/v3.0Beta/highcharts.js
http://jsfiddle.net/Zvrt6/1/
Increase Height and width of your chart div or put your code in jsfiddle if possible, so that we can get more idea
This example could be relevant to your situation- http://jsfiddle.net/4ac8b/1/. When you re-size the result pane you will notice the chart size changes accordingly.
You will need to set the size of your container so that the chart is drawn in that area itself. http://jsfiddle.net/4ac8b/. Even when you re-size the result pane the chart size wont change.
Change the diameter of your pie chart to allow additional information
http://www.highcharts.com/ref/#plotOptions-pie--size