Highcharts

Add buttons in chart of Highcharts at runtime

人走茶凉 提交于 2019-12-18 17:04:21
问题 I need to add some custom buttons (with onclick events), without overwrite the exporting buttons value, 'cause I wanna include new buttons without lost the custom buttons previously defined in chart (my chart already has custom buttons defined), all this at runtime, in a Highcharts chart using this object: $('container').highcharts() Is this possible? 回答1: You can add custom buttons using the exporting object: exporting: { buttons: { customButton: { text: 'Custom Button', onclick: function ()

Highcharts.js - multiple themes on same page?

社会主义新天地 提交于 2019-12-18 15:53:15
问题 I have about 6 charts on one page, one of them needs to have a different theme from the other five. I have the themes working individually but the second one initialized is applied to all the charts. Is there a way to specify which theme a chart uses? 回答1: After reading Ricardo's comment I realized I just had to move the setOptions() call inside the $(document).ready call. A much simplified version of my code: Highcharts.theme1 = { chart: { borderWidth: 0, }, }; var chart; $(document).ready

missing value in highcharts line graph results in no line, just points

守給你的承諾、 提交于 2019-12-18 14:18:29
问题 please take a look at this: http://jsfiddle.net/2rNzr/ var chart = new Highcharts.Chart({ chart: { renderTo: 'container' }, xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, series: [{ data: [29.9, '', 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }] }); you'll notice that the data has a blank value in it (the second value), which causes the line graph to display incorrectly. Is this a bug? What is the correct

missing value in highcharts line graph results in no line, just points

帅比萌擦擦* 提交于 2019-12-18 14:18:03
问题 please take a look at this: http://jsfiddle.net/2rNzr/ var chart = new Highcharts.Chart({ chart: { renderTo: 'container' }, xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, series: [{ data: [29.9, '', 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }] }); you'll notice that the data has a blank value in it (the second value), which causes the line graph to display incorrectly. Is this a bug? What is the correct

Filtering legend of a Highcharts by only visible series

落爺英雄遲暮 提交于 2019-12-18 13:19:39
问题 We are using Highcharts and have some complex charts with roughly 75 series within on chart. The series are not used through the whole chart but only for range of three month. So we have about 15 series per year and the overall chart covers five years (makes roughly 15*5 = 75 series). However Highcharts displays all 75 charts within its legend. The goal is to minimize the legend to the visible series only. We are able to determine the related series in JS code and we tried to toggle the

when is a highchart completely loaded?

二次信任 提交于 2019-12-18 11:47:09
问题 I saw this code: http://jsfiddle.net/AVygG/ I'm curious when is the point that the highchart gets loaded completely? I saw in highcharts documentation that events: load: should do the magic of being able to call the callback function when the highchart is completely loaded. If it were completely loaded, then could I assume that var chart should already have the values when the alert pops? Is that a good basis that the chart is already loaded? The reason I asked is that I'm working on another

Is there a way to disable the Title and Subtitle in Highcharts?

风流意气都作罢 提交于 2019-12-18 11:14:26
问题 I'm just going to hardcode it in using html that is around the graph, I don't want to use the built in. I don't see a "disable: true" option in the API. Can anybody help me out here. How do you disable the title / subtitle in highcharts? (if you simply leave the text blank it still carves out a whitespace in that spot where the title is, i'd like to not have this happen) 回答1: Setting the title text to an empty string is the way to do it. No space is created for the title in that case: without

Want to take difference between single series data and show them on chart in highcharts/highstock

这一生的挚爱 提交于 2019-12-18 09:38:41
问题 I am working on asp.net MVC 5 Referring to my question i want to take difference between each two points like this 2-1 3-2 4-3 5-4 and so on and then put them into my series data in chart Bellow is my controller code //Getting data from DB to view in charts SqlCommand Device_Id_command = new SqlCommand("Select Device_ID, Energy_kWh,Power_kW,Voltage_Phase_1,Data_Datetime,Voltage_Phase_2,Voltage_Phase_3,Current_Phase_1,Current_Phase_2,Current_Phase_3 from [ADS_Device_Data] where Device_Serial

blank page highchart in using jquery to call json arrary

泪湿孤枕 提交于 2019-12-18 09:37:54
问题 I have a php page (array.php). On the browser, array.php produces the ff result [{"name":"London","data2":["70","19"]},{"name":"Tokyo","data2":["60","18"]}] array.php page <?php //header("Content-type: text/json"); header("Content-type: application/json"); $db = mysql_connect("localhost", "username", "userpasswd"); mysql_select_db("weather",$db); $query = "SELECT * FROM measures"; $result = mysql_query($query,$db); while($row = mysql_fetch_array($result)) { $h = $row["humidity"]; $w = $row[

How to show/hide categories with checkbox using highcharts?

爱⌒轻易说出口 提交于 2019-12-18 09:26:46
问题 I want show/hide some categories in highcharts using checkbox, can you help me? This is my code so far: var categories = chart.categories[0]; if(categories.graphic.visibility == 'hidden'){ categories.graphic.show(); } else { categories.graphic.hide(); } 回答1: This seems to be a pretty common question in a variety of forms, and with a variety of solutions. I have created a demo to do this in a way that is dynamically built upon a pre-processed category array and series object. It uses the array