score:0
Accepted answer
Cool question.
Your rotation algorithm is a bit flawed. Say, for example, you want the startAngle to be such that it rotates your 3rd slice to start at 0 degrees (top of the chart). This would be:
-(slice1ArcDegrees + slice2ArcDegrees)
The ArcDegrees can be found by:
(percentage/100.0 * 360.0)
Putting this together in the point click handler:
var points = this.series.points;
var startAngle = 0;
for (var i = 0; i < points.length; i++){
var p = points[i];
if (p == this)
{
break;
}
startAngle += (p.percentage/100.0 * 360.0);
}
this.series.update({
startAngle: -startAngle + 180 - ((this.percentage/100.0 * 360.0)/2) // center at 180
});
Here's an example.
Source: stackoverflow.com
Related Query
- Highcharts - Rotate pie chart aligning the clicked section to a fixed point (180°)
- How to display the value instead of percentage in a pie chart using jquery Highcharts
- HighCharts - Make the pie chart 100% of the div
- Highcharts => Getting the id of a point when clicking on a line chart
- Highcharts Pie Chart ignores percentageDecimals tooltip setting and has floating point inaccuracy issue
- Get name of clicked point in Highcharts when the point has drilldown
- Highcharts column + line combination chart with multiple series. Issue aligning line over the column
- Redraw the pie chart in oval shape highcharts
- Highcharts - how to do a responsive pie chart when the texts of the labels are long
- Highcharts Bubble Chart - How to get the size of the point
- Click a point on a highcharts graph from outside of the chart
- Highcharts display label for pie chart using html table as data source
- Rename the "slices" in Pie chart using Highcharts in shiny R
- HighCharts show selected point from chart on Pie Chart
- why its difficult to set point padding and placement dynamically according to the data in fixed column chart (highcharts)?
- highcharts donut pie - How to calculate pie size percentages after resize the chart
- How to show circular progress pie chart using the highcharts
- Update datalabel on click of a point on the series of a highcharts timeline chart
- Optimizing the size of pie chart in Highcharts
- Highcharts Pie Chart Add Value to the Legend
- Display of plotted point labels not appearing properly on X Range Chart for the first date of month - Highcharts
- How to modify the code so that Highcharts graph does not cover fixed navigation bar at the top of the page?
- Position single data label of highcharts pie chart centered below the chart
- Highcharts same legend color as of the pie chart slice color
- How to make legend labels to bring out the series of a pie chart and not make them disappear when label is clicked in HighCharts?
- How to make a rendered label in Highcharts always visible and still relative to the point clicked or hovered over
- Disabling a slice for a Highcharts pie chart when creating the chart
- Highcharts pie chart list of selected section
- Highcharts piechart with slice animation and drilldown on click together throws exception in chart and breaks the pie chart
- Highcharts same legend color as of the Pie chart slice color?
More Query from same tag
- Highcharts Label Date Format
- How to create multiple highchart and print in HTML page by using for loop?
- Different HighCharts Version on One Page
- rCharts HighCharts X-axs grouping
- Negative values causes wrong y-axis highcharts
- Title/Text In Event (marker) Tooltip?
- Highcharts : display a second series under the X-Axis
- Use different markers in the same series of an irregular time highchart
- What is this Highstocks UI element, and can it be controlled independently of the tooltip?
- How to create a tooltip chart in r using highcharter?
- Highcharts: Remove extra margin y-axis when plotting multiple series
- Highstock Stockchart with custom color for single grouped column
- How do I get DateTime from mysql and set it to json format ready for highcharts
- Disabling highcharts stacked bar's highlight
- Can not exporting renderer shapes added in callback function in highcharts / highstock
- Custom Notation in HighChart series
- highcharts, four aeraranges with linear gradients
- highcharts / highstock column doesn't show all datalabels
- Highcharts : Info about clicked legend item pass to controller
- Activity gauge High Chart with Range option
- series is truncated after click on the series in the legend
- highchart stacked column total data per categories
- Is there a method to find the plot graph data in a web page?
- HighCharts : 3D Pie Chart Not Displaying
- Automatically join missing data gaps in Highcharts JS
- Highstock - disable vertical indicator
- Highcharts combining a column and spline chart from an html data table
- Highcharts and JSON problems
- Highcharts how to only plot if x axis is having value greater than 0?
- Proper JSON format for highcharts