score:81
You can achieve the full height of the pie chart by setting the size
attribute in the plotOptions
of pie and removing margins
, spacing
and titles
from the chart.
Code
chart: {
margin: [0, 0, 0, 0],
spacingTop: 0,
spacingBottom: 0,
spacingLeft: 0,
spacingRight: 0
},
plotOptions: {
pie: {
size:'100%',
dataLabels: {
enabled: false
}
}
}
Example (updated the fiddle to point to version 2.2.4)
Here is an example demonstrating this.
As to the linear gradients, I don't know if they have been implemented yet, but here is an example showing radial gradients.
Radial gradients are also part of Highcharts 3.0 now, here is an example
Update
Looks like as of Highcharts 3.0, this is not possible anymore due to the chart auto-scaling within the plot area, an excerpt from their documentation:
size: The diameter of the pie relative to the plot area. Can be a percentage or pixel value. Pixel values are given as integers. The default behaviour (as of 3.0) is to scale to the plot area and give room for data labels within the plot area. As a consequence, the size of the pie may vary when points are updated and data labels more around. In that case it is best to set a fixed value, for example "75%". Defaults to .
in my opinion this should not be the case since dataLabels
are disabled. should probably be logged as a bug
Update (Aug 2014)
As per Torstein's comment, this is indeed still possible. slicedOffset
needs to be set to 0
in addition to the margins begin set. (example)
$(function () {
$('#container').highcharts({
title: null,
chart: {
type: 'pie',
margin: 0
},
plotOptions: {
pie: {
slicedOffset: 0,
size: '100%',
dataLabels: {
enabled: false
}
}
},
series: [{
data: [
['Firefox', 44.2],
['IE7', 26.6],
['IE6', 20],
['Chrome', 3.1],
['Other', 5.4]
]
}]
});
});
#container {
outline: 1px solid red;
padding: 0;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<div id="container" style="height: 400px; width: 500"></div>
score:0
my solutions; (for legend position margin-top error..)
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'pie',
height:'100%' // added...
},
plotOptions: {
pie: {
size:'100%',
height: '100%',
dataLabels: {
enabled: false
}
}
}
Source: stackoverflow.com
Related Query
- HighCharts - Make the pie chart 100% of the div
- Make highcharts fullscreen also fullscreen the div wrapping the chart
- How to display the value instead of percentage in a pie chart using jquery Highcharts
- How to make a pie chart from highcharts responsive
- Highcharts - Rotate pie chart aligning the clicked section to a fixed point (180°)
- What's the correct .csv format to make a pie chart in Highcharts?
- Redraw the pie chart in oval shape highcharts
- Highcharts - how to do a responsive pie chart when the texts of the labels are long
- How can I make milestone lines with a GANTT chart using the highcharts library?
- Highcharts - pie chart with html div at center
- Highcharts display label for pie chart using html table as data source
- Rename the "slices" in Pie chart using Highcharts in shiny R
- Highcharts how to make a set number of colors for pie chart data and drilldown data
- How to make a HighCharts drilldown column/bar chart that does not hide the non-drilldown categories
- Want to make the Highcharts Bar Chart data labels appear on the far right in the chart
- Highcharts - Make text inside pie chart responsive
- highcharts donut pie - How to calculate pie size percentages after resize the chart
- How to show circular progress pie chart using the highcharts
- Highlight a slice of pie chart in highcharts on click of a div
- Highcharts make pie chart goal value only 50%
- How to make Highcharts legends focus on the chart that it belongs to?
- Optimizing the size of pie chart in Highcharts
- Highcharts Pie Chart Add Value to the Legend
- 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 highcharts tooltip show outside of the pie graph?
- Disabling a slice for a Highcharts pie chart when creating the chart
- 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
- Is it possible to change background color of highcharts?
- Highcharts chart not showing in IE9
- Returning JSON file with cURL to use data in a HighCharts stock chart
- Grouping / counting in javascript using underscore.js
- Highcharts - cannot force x axis to stop on a certain date
- EXPLAINE : Highstock Displaying 1.7 million data points in Highcharts Stock
- D3.js tooltips not displaying correctlty when generated with Highcharts
- Getting an image (eg svg) created on the client in javascript, back to the server side for c#
- Highcharts: completely custom label positions on x-axis
- How do I include scripts in my AngularJS controller?
- highcharts download not working from html page with iframe in IE
- How to modify highstock chart so that it can be used for displaying ranks (Lowest values on highest points)
- Which differences in javascript object creation syntax have I not understood? IE8 vs Chrome
- highcharts.js add mouseOver function or hover states (implement breaks chart?)
- How to convert an object array DataTable recognizes to something Highcharts recognizes?
- change highstock flag to lines on xAxis
- modifying Highcharts tool tip with for a bar chart dynamic data
- Highcharts - Hide series "points" (labels) on both x- and y-axis
- change theme of highscharts (highstock) chart
- Asyncronously Load Panels using jQuery in ASP.NET application
- Issue on Setting Highcharts Spider Web Legend in One Iine at button of Chart
- How can I change the distance between columns in highcharts?
- HighCharts Column Chart Spacing Between Columns
- How To Reset Size On drillUpButton Click
- Hide segment of a line in Highcharts
- Donut chart with text inside pie and downward as well
- How do I add images to my highcharts figure?
- set minimum and maximum values for axis' data in highchart
- Attach object to Highcharts click event
- Highcharts - Update column chart in real time