Highcharts

Highcharts Chart Corrupted on Range Selector Button Press

一世执手 提交于 2020-01-06 07:13:27
问题 It appears that when changing the data grouping via the range selector buttons, the chart does not erase the old dataGroupings, so the chart becomes messy quickly. You can see the issue here. Is there any way to fix this? Below is the code that generates the chart. Highcharts.stockChart('container', { chart: { height: 300 }, rangeSelector: { allButtonsEnabled: true, buttons: [{ type: 'month', count: 3, text: 'Day', dataGrouping: { forced: true, units: [['day', [1]]] } }, { type: 'year', count

Highcharts: Add plotlines based on enabled series

冷暖自知 提交于 2020-01-06 06:19:05
问题 I made a line chart with multiple series (4). So the chart displays 4 lines. All the series are displayed in the chart legend and can be enabled/disabled by clicking them. I want to add plotlines on the Y-axis with the maximum value of each series. This is easy to achieve by just defining 4 plotlines. He comes the tricky part. When a series gets disabled (hidden), how can I hide the corresponding plotline on the Y-axis? I found this fiddle adding plotlines dynamically when you click the chart

Angularjs highchart doesn't show in IE and SAFARI

有些话、适合烂在心里 提交于 2020-01-06 06:06:49
问题 highchart doesn't show in IE and SAFARI. I try the solution from the official highchart forum, but nothing help (remove "," at the end of json, or resize page on load etc... ) I have multiple different highcharts, but here is only one for explanation. I call config function depends on chart data. My app have many different parts, and it's very hard to make working plunker. Thnx Here is my code function getBaseChartConfig(graphName) { Highcharts.setOptions({ global: { useUTC: false } }); var

Pie Chart Custom Legend

故事扮演 提交于 2020-01-06 04:43:07
问题 I am using highcharts to build a Pie chart, I am hiding the default legend that comes with highcharts and making my own. I am able to build one for line graphs, but when I do it for a pie chart, I can not get show()/hide() methods of the data to work because they are all in the same series. How can I get show()/hide() to work on a pie chart? var chart = $('#chartdiv').highcharts(); $(".legend div").html(""); $(chart.series).each(function(seriesKey, series){ $(series.data).each(function(k, v){

show tooltips of piechart when hover outside of the chart on a button

帅比萌擦擦* 提交于 2020-01-06 04:16:44
问题 http://jsfiddle.net/39UXK/4/ in this example I want to see the tooltips of the piechart when i hover on the respected buttons. Can anyone please help me here ? Cheers 回答1: You need to find the point in question, select it, and refresh the tooltip: // find the point var point = chart.series[0].points[i]; // select the point point.select(); // refresh the tooltip chart.tooltip.refresh(point); 来源: https://stackoverflow.com/questions/11671227/show-tooltips-of-piechart-when-hover-outside-of-the

Highstock Change tick interval on range selector change

前提是你 提交于 2020-01-06 04:04:18
问题 I am unable to get the tickinterval to update in the following Jsfiddle: https://jsfiddle.net/rarwarrar/5xgoqjst/4/ Currently this: xAxis: { events: { setExtremes: function(e) { if (e.rangeSelectorButton.text === "2Hour") { $('#chart').highcharts().xAxis[0].tickInterval= 2700000 //45 min $('#chart').highcharts().redraw() } } } }, Is not working. For instance can the tick interval be set to every 45 minutes once '2hour' is clicked? 回答1: You can use tickPositioner function for changing your

Highchart: how to update a dynamic chart by clicking on a button?

岁酱吖の 提交于 2020-01-06 03:48:26
问题 I intend to have a button on my web page so that upon clicking a button, a point will be added to a chart without redrawing the whole chart (the chart is a modified version of this http://www.highcharts.com/demo/dynamic-update). However, my current code is not working. Here is the code in concern: http://jsfiddle.net/wtvaz9gc/7/ var series; $(function drawCharts(numberOfPoint) { // if(typeof chartData == undefined){ // chartData = $(dataStore.getXml()); // } $("#b").click(function(){ series

Get javascript highcharts to render inside a Bootstrap Popover

泪湿孤枕 提交于 2020-01-05 17:16:10
问题 Title is pretty self-explanatory. Here is a jsfiddle with the popover and the highcharts js code. Chart only shows if you move targeted div outside the popover. <a id="demo" href="#" tabindex="0" class="btn btn-lg btn-danger" data-toggle="popover" data-trigger="focus" title="Dismissible popover" data-content="And here's some amazing content. It's very engaging. Right?">Dismissible popover</a> $(function () { $('#container').highcharts({ title: { text: 'Monthly Average Temperature', x: -20 /

How remove zero values in a heatmap?

本秂侑毒 提交于 2020-01-05 13:57:22
问题 I use highcharts to build a heatmap and after figuring out how to put my data in, I am overwhelmed with the number of possible configuration elements. One of the elements I would like to remove the number 0 when there are no matches: How can I do that? A simplified (but functional) version of the heatmap is below (in case there are problems to run it, a JSFiddle is available as well). The 0 is what I want to get rid of. Highcharts.chart('container', { chart: { type: 'heatmap', plotBorderWidth

How to tell Highcharts to set date on the x axis, and use a range of time (like 1 day)

醉酒当歌 提交于 2020-01-05 12:27:25
问题 I am trying to understand the issue here; I have a data file that contains dates for each of my value. When I use it on the x axis; the result is that I will have the x axis split the values evenly, so if a point is at 2:30 2:31 and another at 2:32, the values will be side by side, evenly spaced; while I would expect that the x axis would be split based on the first and last date (like in 2 if there are 2 days, in 3 if there are 3 days and so on) Instead I would like to have a range based on