How can I customize the legends in main series then its sub series like
Test
Test1
Test2
Demo
Demo1
Demo2
It is possible to use legendIndex per data point / pie slice and in legend's labelFormatter you could change display based on what series is used.
Since you are parsing your data before using it in HC, don't forget to add legendIndex property for parsed data.
Example: https://jsfiddle.net/10dbmwtf/
Related
I am creating a chart which internally is built using multiple highcharts.I want to create a custom legend for whole chart. Is there a way to show custom legend. Is yes then can someone point me to some example.
I am new to highcharts and trying to show the chart and data at the same time.
Like the whole display should be like this.
First column : Station Name(data)
Second column : horizontal bar
Third column : Data.
Is it possible to paint it only using highcharts API's ?
Thanks
Sukanta
You are basically talking about a regular bar chart with a categorical axis and data labels:
http://jsfiddle.net/JVNjs/288/
categories:['group a','group b','group c','group d','group e']
I don't think that there is a default setting that will align the data labels all to the right in a column as you requested, but I am sure there is a workaround that will allow it to be done.
When using Highcharts, is it possible to change the contents of the legend to display something other than the series?
For example, I have a scatter chart with just one series but with many elements, so that the element labels obstruct one another and are illegible:
Would it be possible to use the legend to display the element names instead of the series? (each member in the series has a different color so that it is possible to use the legend in this case)
EDIT:
It turns out there isn't any good way to do this, so I wrote my own custom legend. You can find the code here: http://pastie.org/5115536
I hope you find it useful
Highcharts allows to show data points instead of series name in the in the legend. But, Unfortunately its only for Pie charts type:pie.
There is a default option available for the Pie Chart though undocumented in the API.
legendType: 'point',
If you try to set it for other type of chart, Legend does not gets rendered.
I want to move the categories on my Y Axis inside the chart, like the new Google Analytics does.
See image:
You have 2 options.
1)You can use the labels.align property.
http://jsfiddle.net/gh/get/jquery/1.7.1/highslide-software/highcharts.com/tree/master/samples/highcharts/yaxis/labels-align-left/
2)Use the labels.x property
http://jsfiddle.net/gh/get/jquery/1.7.1/highslide-software/highcharts.com/tree/master/samples/highcharts/xaxis/labels-x/
I had drawn a pie chart using core-plot. I need to display the item name when a particular slice is touched. can anyone suggest me a solution to achieve this?
You can handle individual slice events by implementing CPPieChartDelegate methods. Declare CPPieChartDelegate protocol and implement the method (void)pieChart:sliceWasSelectedAtRecordIndex: . Set the delegate of piechart to self(controller). This method gives you which slice(index) is selected. And now for drawing the label, you have to re-draw the pie chart, specifying which slice to be labeled. You can set empty string to labels for other slices.
The iPhone version of CPTTestApp (in the Core Plot examples folder) shows how to display the selected slice index. It displays the index in the graph title, but you just as easily display it in a Core Plot annotation or in a separate UI control.