highstock

Is it possible to hide the navigator in highcharts at runtime?

╄→гoц情女王★ 提交于 2019-11-30 22:18:58
I am working on a highcharts project where we have a requirement to show/hide the navigator at runtime, depending on the value of an on screen filter. We already add/show/hide various series of data - but I cannot find an api call which will allow me to dynamically hide the navigator at runtime? Does anyone know of a way to do this - I am reluctant to reload the whole chart unless I have to. Thanks folks! You can hide all particular SVG navigator elements by hide() function. http://jsfiddle.net/dJbZT/1 $('#btn').toggle(function () { chart.scroller.xAxis.labelGroup.hide(); chart.scroller.xAxis

Displaying multiple series in the navigator of an HighStock chart

半城伤御伤魂 提交于 2019-11-30 20:13:30
I would like to create an HighStock chart containing a navigator component displaying multiple series, being the same series displayed in the main graph. It seems that this feature is not supported in HighStock, as only one single series is allowed. Has anyone faced this problem and managed to find a viable solution/alternative? Multiple series in navigator are not oficially supported, so only this "hack" which you use display multiply series in navigator. Example: http://jsfiddle.net/6fFwM/ This feature is requested in our system here ( http://highcharts.uservoice.com/forums/55896-general

Highstocks - How to change the default Zoom

半世苍凉 提交于 2019-11-30 08:21:55
This question results from hours of googling highstocks, zoom, extremes, ranges, and every other possible variation of the words, all resulting in some variation of custom functions for high charts answers. Is there a way to simply change the default zoom to 1 month instead of 3 months in HighStocks (not HighCharts) without writing a function to calculate what it happens to be? You can change it by the following code: new Highcharts.StockChart({ . . . rangeSelector: { selected: 0 } }); You can take a look the following example: http://jsfiddle.net/QnvrR/ . The default buttons are: buttons: [{

Why .html() doesn't work with SVG selectors using jquery ?

南楼画角 提交于 2019-11-30 06:54:26
Question can some one tell me how can i convert my SVG element to a string ? i'm using canvg to convert my SVG to an image. it has to be render in a canvas first , the canvg() method is expecting a SVG STRING code : function updateChartImage(){ canvg(document.getElementById('canvas'),expecting ` svg string`); var canvas = document.getElementById("canvas") ; var img = canvas.toDataURL("image/png"); img = img.replace('data:image/png;base64,', ''); $("#hfChartImg").val(img) ; $('#img').attr({ src: img }); } i have tried $('#container svg').html() ; // it gives me an error //Uncaught TypeError:

Replacing/removing the metric notations like thousands “k” abbreviation

故事扮演 提交于 2019-11-30 06:41:30
My areaspline chart has Y axis values up to approximately 6000. Highcharts automatically changes the "000" part on my Y axis for a "k". As I'm french and the site is meant to be in that same language, this "k" abbreviation won't make sense in my case and I'd like to have a casual "000" display instead of it. Is this possible? How? You can do this by explicitly overriding the lang.numericSymbols* with null in the defaultOptions as follows Highcharts.setOptions({ lang: { numericSymbols: null //otherwise by default ['k', 'M', 'G', 'T', 'P', 'E'] } }); The documentation reads as follows

Displaying multiple series in the navigator of an HighStock chart

本小妞迷上赌 提交于 2019-11-30 03:59:23
问题 I would like to create an HighStock chart containing a navigator component displaying multiple series, being the same series displayed in the main graph. It seems that this feature is not supported in HighStock, as only one single series is allowed. Has anyone faced this problem and managed to find a viable solution/alternative? 回答1: Multiple series in navigator are not oficially supported, so only this "hack" which you use display multiply series in navigator. Example: http://jsfiddle.net

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

霸气de小男生 提交于 2019-11-29 18:15:10
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_Number=@serial_number AND Data_Datetime between'" + time.ToString(format) + "'AND'" + time2.ToString

Can not exporting renderer shapes added in callback function in highcharts / highstock

丶灬走出姿态 提交于 2019-11-29 18:14:24
I want to dynamically added several primitive shapes like text and images into highcharts / highstock. Please see this fiddle . $(function () { var chart = new Highcharts.Chart({ chart: { renderTo: 'container', spacingBottom: 50 }, xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, series: [{ data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }] }, function(chart) { // on complete $("#add").click(function(){ chart.renderer.image('http://highcharts.com/demo/gfx/sun.png', 100, 100, 30, 30) .add(); }); }

Highstock X-Axis: Categories in Place of Time

让人想犯罪 __ 提交于 2019-11-29 16:11:06
Is it possible to use categories as x-values in Highstock? I don't need a time bar as x-axes, but something like numbered ratings. This works in Highcharts, but i need the scrollbar functionality from Highstock. You can use highstock release, but use highcharts and scrollbar. Take look at example: var chart = new Highcharts.Chart({ chart: { renderTo: 'container' }, xAxis:{ min:0, max:2, categories:['first','second','third','fourth'] }, scrollbar: { enabled: true }, rangeSelector: { enabled:false }, series: [{ name: 'USD to EUR', data: [1,3,4,6] }] }); http://jsfiddle.net/b826C/ You may be able

Highstocks - How to change the default Zoom

倖福魔咒の 提交于 2019-11-29 11:06:21
问题 This question results from hours of googling highstocks, zoom, extremes, ranges, and every other possible variation of the words, all resulting in some variation of custom functions for high charts answers. Is there a way to simply change the default zoom to 1 month instead of 3 months in HighStocks (not HighCharts) without writing a function to calculate what it happens to be? 回答1: You can change it by the following code: new Highcharts.StockChart({ . . . rangeSelector: { selected: 0 } });