score:0
each time a chart changes size redraw event of a chart is triggered. you can check width of a chart in that event and call additional update for series, because if you change your labels' text to one with <br>
tags, then pie seems to be fitting well. in case your issue is more complex solution will still be similar - check size and update chart.
example with changed point names: http://jsfiddle.net/j86jkfvj/114/
example with series update when width is < 900px: http://jsfiddle.net/dhwzw8qg/
score:0
here's an example i found of redrawing the pie based on a resize event of the page. i've used it and works well:
html:
<div class="wrapper">
<div id="container" style="width:100%;"></div>
</div>
js:
$(function () {
$('#container').highcharts({
chart: {
plotbackgroundcolor: null,
plotborderwidth: null,
plotshadow: false
},
title: {
text: 'responsive resize'
},
tooltip: {
pointformat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotoptions: {
pie: {
allowpointselect: true,
cursor: 'pointer',
datalabels: {
enabled: true
}
}
},
series: [{
type: 'pie',
name: 'browser share',
data: [
['firefox', 45.0],
['ie', 26.8],
['safari', 8.5],
['opera', 6.2],
['others', 0.7]
]
}]
});
function redrawchart(){
var chart = $('#container').highcharts();
console.log('redraw');
var w = $('#container').closest(".wrapper").width()
// setsize will trigger the graph redraw
chart.setsize(
w,w * (3/4),false
);
}
$(window).resize(redrawchart);
redrawchart();
});
Source: stackoverflow.com
Related Query
- How to make a pie chart from highcharts responsive
- Highcharts - how to do a responsive pie chart when the texts of the labels are long
- Highcharts how to make a set number of colors for pie chart data and drilldown data
- Highcharts - Make text inside pie chart responsive
- how to make chart real time with 2 line and get data from php with highcharts
- how to show legend in PIE chart from chart to pie drilldown highcharts
- How to make highcharts stacked bar chart start from a specific date
- How can I pull only specific columns \ cells from csv in <pre> tag, into highcharts pie chart
- How to draw a chart from one array of data and make labels on the chart from another array of data? Highcharts v.4.0.4
- How to make the highcharts generated chart be scalable or responsive
- How to display the value instead of percentage in a pie chart using jquery Highcharts
- HighCharts - Make the pie chart 100% of the div
- How can I remove the white border from HighCharts pie chart?
- how to make highcharts pie datalabels always in center of each slice?
- How do I make each row in a HTML table a pie chart in Highcharts?
- Highcharts - How can I remove starting and ending padding from area chart
- How to remove white space from pie chart in highchart.js?
- How get data name in Highcharts pie chart legend instead of "Slice" using array of values?
- How to create an inner circle pie chart in Highcharts
- How to center chart title position dynamically inside pie chart in highcharts
- HighCharts : How to add or remove "chart context menu" from chart container?
- How to get text from html table in pie chart (highchart)?
- How to center highcharts pie chart and legend on a page?
- How Can I Hide a Pie Chart's Slice in HighCharts Without Removing It From the Legend?
- How to make Highcharts fetch data from external JSON file?
- How can I make a graph with highcharts from csv file?
- Highcharts - How to make a scatter plot with multiple series from HTML table
- How to generate highcharts chart from multiple local json files
- Highcharts - removing a segment from a pie chart
- highcharts - how to controle slice pie from bottom
More Query from same tag
- generate chart using google spreadshhet and highstocks chart
- Trying to iterate over json string
- dataLabels for bar chart in Highcharts not displaying for null values in 3.0.8
- Highcharts-legend-item.last() disappears when changing tab
- How te get the name property of a selected point in a highmap
- Highcharts (javascript) strange artifact (bug?) with simple graphic
- Area range legend icon does not match marker
- Highcharts General Drawing parameter
- How is it possible to show the menu of a chart with React Highcharts?
- How to display the collection in the library dynamically Highcharts - Bind collection with Highcharts in MVC
- Render a list of highcharts in Rmarkdown
- show only one series data in High charts in start of drawing/load
- Highcharts Selection Event Disable highlighting Effect
- Highcharts chart event load not working for wordcloud
- Highmap R (or) javascript - adding custom legend
- Drag multiple points at one time in highcharts
- highlight a whole series when hovering with the mouse
- How to make border for sparkline highcharts table?
- Highcharts Populating Realtime Data with Time
- Highchart Graph Issue
- Highcharts - Stacked bar chart - Remove axis
- Custom Highcharts Context Menu Button Appearing in Every Chart on Page
- Highcharts chart with Error bars from CSV
- rCharts HighCharts X-axs grouping
- Transfer Multiple Textbox value into Pie Chart slices(Percentage)
- Improving rCharts performance when plotting thousands points
- Scraping data from high charts
- Graphs backround on Iexplorer after Deploying it on the server
- Highcharts / HighStock gapUnit breaks navigator
- Highmaps Kentucky isn't highlighted when printing using US-All map