How do i close the padding between chart title and the chart. See image attached
I would suggest placing the chart into a BoxLayout.Y_AXIS instead of what I assume is the center of a BorderLayout. The center of the BorderLayout stretches to take up available space and the chart aligns to the center. The box layout will give the chart the full width and its preferred height.
Related
With center mode on if the width is adjusted
(img width, and item width in styles.css)
The carousel does not scroll the correct amount and the main item is off center. This seems like it should be solved by additionalTransfrom, but sadly not..
Here is a codesandbbox
https://codesandbox.io/s/summer-grass-m5uz6f?file=/src/App.js&resolutionWidth=600&resolutionHeight=1024
I have also seen this thread, which describes the same problem
https://github.com/YIZHUANG/react-multi-carousel/issues/272
Here is the recharts - Bar chart sample I have tried. https://codesandbox.io/s/simple-bar-chart-forked-8tu41b?file=/src/App.tsx
When width is lesser, Yaxis label is not started from the first, it seems to be cutoff like below. Example full email is "longnametestuser#testdomain.com" but it is starting from "user#testdomain.com". (Note: Even if we add tickFormatter to add ellipse after certain characters in label, it is not aligning unless we give proper width meaning it is cut off at the start. I could not understand it. Please help me to understand and align it.)
And when viewing the chart in the Large and Small mobile screens, chart bars are overriding the labels like this,
I have wrapped the chart inside the responsive container still chart bars and labels are not fitting properly. Any suggestions for this problem would be very helpful.
Thank you in advance.
I request for help aligning the legends of a pie chart to the left. By default it aligns to the bottom but I want them on the left.
You can override the draw legend API in PieChart or better yet draw it manually using a Container with some labels. You can place it in a layered layout on top of the pie chart anywhere you want or just place it in the EAST/WEST side of that chart using a border layout.
I am unable to fix the donut size in c3js. Whenever the no of labels int the legend and the length of the labels increase, I need to increase the chart size to accommodate them. But this affects other charts with less no of labels in the legend. To be consistent, I use the same chart size for all the donut charts I show in the page. But the size of donuts are all different according to the legend labels and it does not look good. Any suggestion on how to fix the donut size regardless of the legend labels. I am using padding to place the legend on the right of the chart.
Below you can find the code to generate the chart :
<c3chart bindto-id={{id}} chart-data="piePoints" chart-columns="pieColumns" padding-left="0" padding-right="300" padding-top="0" padding-bottom="0">
<chart-size chart-width="400" chart-height="300" />
<chart-donut width="40" expand="false" show-label="true"></chart-donut>
<chart-legend show-legend="true" legend-position="right" />
<chart-tooltip show-tooltip="false"/>
</c3chart>
In the fiddle below, I have 3 charts generated by c3js. I want to fix the size of the chart but it can be seen that the donut size varies according to the legend.
https://jsfiddle.net/anu23/qzew784d/2/
Is there way to keep the donut size fixed regardless of the legend label length and the no of labels in the legend.
As you can see from below my LineSeries chart (Silverlight Toolkit) utilize the whole area. How can I add a padding to it? So that the line does not stop/end/start at the border. For as you can see from the label it gets overlapped with the border, making it look less nice.
Why don't you increase the axis? Like: Vertical axis goes from 1000 to 9000 - and horizontal axis goes from 30.07 up to 08.08.
And: If you want to set margins to the whole control - doesn't margins / padding work for you?