Search the Community
Showing results for tags 'horizontal bar width'.
Found 1 result
-
Horizontal Bar inner, <rect>, element does not fill container, <svg>, element width.
BenBiz posted a topic in General usage
When creating a horizontal bar chart, the bar width does not fill the container. In my example the svg element (and container) have a 563px width. However, the rectangle (rect) element inside the svg only has a 485px width. The images below show chrome dev tools illustrating the problem. Also, this does not happen in every case. This example has two bar charts on top of each other. The first renders almost the full width but the second, pictured below, does not. The only difference in the code between the two is the values in the dataSource, yet they render different widths. How can I guarantee that the chart width will be consistent and fill the container? <ReactFusioncharts type={'stackedbar2d'} width="100%" height={80} dataFormat="JSON" dataSource={dataSource} />