AChartEngine Graph with long legends - achartengine

I have a LineChart with 4 lines and their legends are long so I can only see the first two... I tried to put a ScrollView but it didn't work. What can I do? Thank you

Some ideas:
Shorten the series titles so that you get shorter stuff in the legend.
Increase the legend height renderer.setLegendHeight();
Make the legend auto-resizable renderer.setFitLegend(true);

Related

How to align multiple charts with different data

I have three pie charts displayed in a row. Two have two segments, one has five. All three have vertical legends.
Given that, the chart with five segments displays the pie slightly smaller, due to the extra height of the legend. It also has a slight negative vertical offset.
Is there any way I can set all three charts to render the chart in the same position? I've tried setting the center to 50%,50% in plotOptions, didn't help.
You have to set the marginBottom-Value of the chart to a value that is equal an all charts. Highcharts is trying to display the pie as big as possible, therefore it will use more space if the legend is not as big.
By setting the marginBottom you force the chart to ignore the actual legend size.
The center: ['50%','50%'] setting will only take into account the actual plot area. So if this area is decreased because of a taller legend it has no effect.
I made a jsfiddle where you can explore this settings:
http://jsfiddle.net/doc_snyder/dsmgy6ts/

How to set different bar width in the same series Highchart

In my bar chart the point range is not equally, so I want to draw different widths for bar chart using highchart. However, all the solution is to draw different series. I wonder is there any solution to hack the code and only change the pointwidth inside one series?
Here is a screenshot
The easiest way would be to change width property of a column SVG element.
Example:
http://jsfiddle.net/6o7290uf/

Constant height of chart regardless number of series displayed in legend

How to configure the chart options to get a constant height chart
regardless the number of series displayed in the legend ?
Below 2 links to exported charts showing the problem.
Notice that the height of the chart has descreased.
Ideally, the legend would be displayed at the bottom of the
chart when user process to an export of the chart.
Let me know if I have missed something from the documentation.
Best regards
Patrick

Spacing between plot border and start of data plotting in highcharts

The problem starts with the fact i have a very small area to plot a chart and i need to have markers on it as well. Now because of the small area, the markers are getting cut off and they are a key piece of information. So is there any way by which i can add some spacing between the border of the plot and the actual start of the data plot itself ?
Heres a running example: https://dl.dropboxusercontent.com/u/138190/charts/index.html
Set minPadding and maxPadding for xAxis. This will work as long, as yod don't have scrolling/panning options enabled.

Highcharts: Dynamically change single column width to highlight one sample

In a Highcharts column chart we'd like to highlight one value/sample by drawing its column a little bit wider... But this seems not to be possible, is it?
pointWidth only affects the whole series.
Maybe I could overlay a second series, but IMHO that's not a nice solution.
You can also use data attribute and modify width.
http://jsfiddle.net/cDvmy/2/
chart.series[0].data[0].graphic.attr({
width:50
});
I don't see any way to do this with the current API. As an equally not nice solution you could adjust the SVG after the plot is drawn:
// make fifth bar of first series wider
var bar = $($('.highcharts-series').children()[4]);
bar.attr('width',parseInt(bar.attr('width'))+20);
bar.attr('x',parseInt(bar.attr('x'))-10); // keep it centered
Fiddle here.

Resources