How to reduce gap/space between chart border and pie chart - jfreechart

I want to increase the width of pie chart by reducing the gap between the chart border and chart. How to achieve this?

The setInteriorGap() method "controls the space between the edges of the pie plot and the plot area itself." Smaller values reduce the gap.

Related

How to specify the width of a particular arc in doughnut chart using react-chartjs-2?

I'm trying to create a doughnut chart with two different arcs of chart having different widths using react-chartjs-2. But I can't seem to find the way to target the width of a particular arc in chart. Can anyone help me with this. Thank you in advance.An example of doughnut chart I want to create is given below

How do we align legends to be on the left hand side of a pie chart?

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.

Is is possible to have a candlestick chart and a line chart on the same XY axis with apexcharts?

I'm using the apexcharts with react to build a chart with two series: one is the price and it should be visualized as a candlestick chart and the other one is the volume and it should be visualized as bar (or line) chart. Is it possible to have both on the same XY axis?
I know that it is possible having two (or more) line charts on the same XY axis as in the attached picture, but I did not see an example for a candlestick chart.
For this example I would like to replace the red line with a candlestick chart.

How to fix the donut chart size in c3js

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.

rotated partial doughnut chart with a point marker in chart.js agularJS

I am trying to create a partial doughnut chart (3/4 doughnut) using angular-chart.js. Is there anyway to do this?
In highcharts.js it is possible to specify the start and end angle (Say -135 to 135 (3/4 doughnut, rotated by -135 degrees) but in chart.js it not present it seems.
The doughnut chart in my case marks 3 regions, red blue green (on scale of 0 to 100) and I need to place a marker on the area (doughnut width is small and the point marker covers the width). I need to place the marker at a point on the chart, say 76( on scale of 0 to 100) and stop the animation at 76.
Is this possible with chart.js? Can anyone share a fiddle?
I don't think it can render partial doughnut/pie charts, but have you considered using a "blank" datapoint? This datapoint can be that remaining 1/4 value (blankData = 100 - (data1 + data2 + data3 + etc...)) You can set the coloring on it to be transparent or to match your page's background colors. In this way you can have what appears to be a 3/4 sized doughnut/pie chart.

Resources