score:1
I'm not sure if this is what you want: see example at jsfiddle
End angle is calculated as proportion of 45*180/100 = 81. So, end angle is at -9.
startAngle: -90,
endAngle: -9,
center: ['50%', '75%']
And data is only one value:
data: [
['Firefox', 45.0]
]
And tooltip is changed to show 45% instead of 100%
tooltip: {
pointFormat: '{series.name}: <b>{point.y:.1f}%</b>'
},
Update: Used idea from @Mark to calculate endData
using input data
(see Mark's comment in his answer). Added also variable for startAngle
. See update at jsfiddle:
var data = 45;
var startAngle = -90;
var endAngle = (data/100 * 180) + startAngle;
endAngle = endAngle == 0 ? 0.01 : endAngle;
...
startAngle: startAngle,
endAngle: endAngle,
...
data: [
['Firefox', data]
...
score:1
Not to steal @AntoJurković's thunder but his idea in the comment is the simplest way to accomplish what you want.
Here's an example fiddle.
The important parts are:
series: [{
type: 'pie',
name: 'Browser share',
innerSize: '50%',
data: [
{y: 45, name: 'Firefox'},
{y: 55, color: 'transparent',dataLabels:{enabled: false}} // instead of the background color, use transparent, and disable dataLabels
]
}]
and
tooltip: {
formatter: function(){
if (this.point.color == "transparent") {
return false; // suppress the tooltips if it has no color
} else {
return this.series.name + ':<b>' + this.point.percentage +'%</b>';
}
}
},
Source: stackoverflow.com
Related Articles
- HighCharts - Pie Semi Circle (Arrow in Chart)
- Highcharts server side rendering draw a mysterious semi circle donut shape
- HighCharts Semi Circle dial that positions correctly
- GWT Highcharts - Semi circle donut
- Yii highcharts draw semi circle
- How to create an inner circle pie chart in Highcharts
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- Highcharts - Global configuration with common code and unique data & Headings
- HighCharts Stock Chart error code 18
- Highcharts - synchronized-charts crosshair line and circle point display
- highcharts change rendered image source on click
- (how) can we create semi circle donut chart, with range labels?
- gauge highcharts : Exterior circle color
- How do i add mouse wheel code in Angular2 highcharts in typescript
- how to display 2 same highcharts without duplicate the code
- Position text and circle in Highcharts graph dynamically?
- Use of DotNet HighCharts dll to make charts in code behind
- How to edit tooltip in Highcharts C# code
- what means ${demo.css} in example files of highcharts ? That piece of code seems to be literal
- passing json values to highcharts from .net code behind
- how to use highcharts tooltip formatter in python code
- Highcharts full circle gauge as in Knob js
- passing formatting JavaScript code to HighCharts with JSON
- Highcharts display label for pie chart using html table as data source
- Simple, Open source PHP wrapper for Highcharts library
- Highcharts Semi Donut Pie with Negative Percentage
- Add Source to Highcharts Export CSV
- HighCharts Polar Labels in between of sectors of circle
- Include additional highcharts source data in angular2 app
- Conditions within highcharts code
- HighCharts - compare series with values instead of percentage
- Highcharts - Specific color zones for HighCharts navigator
- on flag click get series (graph) it's on highstock?
- Highcharts: some x-axis labels are disappearing after using setExtremes()
- Distinguish borders between line and column chart type
- Highcharts: Remove shadow from center of donut chart
- Highcharts refresh tooltip on button click not working with boost modul
- Is angular2-highcharts supported in Angular 11?
- Highcharts : how to set yAxis max value inside angularjs controller
- Highcharts multiple dynamic panes with single legend
- Multiple highcharts charts dynamically created in angular2 on one page
- highcharts scatter 1 second update with user defined lables on x-axis for each point
- Highcharts setting weird column spacing with monthly timeseries
- HTML5/JS Chart with Moving Average
- Highstock highcharts irregular data gets wrong x-scale
- How to set category type with Highcharts and chartkick?
- Highcharts remove() Inconsistencies
- highcharts sum up tooltip {point.y} with a specific number
- highmaps stopped updating after move to .NET Core
- How to put data in one column