highstock

How to position RangeSelector / zoom buttons at custom co-ordinates in Highstock

岁酱吖の 提交于 2019-11-29 10:50:58
I am using highstock charts and wish to move the zoom buttons (1m,2m,etc) to a different position. I checked their API and there doesn't seem to be an option to do that currently. Also the source code suggests that this location is hardcoded and hence i don't think I can easily inject the position using some undocumented property Highstock Source Highcharts.RangeSelector.prototype.render = function (min, max) { ... rangeSelector.zoomText = renderer.text(lang.rangeSelectorZoom, plotLeft, chart.plotTop - 10) .css(options.labelStyle) .add(); // button starting position buttonLeft = plotLeft +

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

自闭症网瘾萝莉.ら 提交于 2019-11-29 08:00:47
问题 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({

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

筅森魡賤 提交于 2019-11-29 05:56:29
问题 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? 回答1: You can do this by explicitly overriding the lang.numericSymbols* with null in the defaultOptions as follows Highcharts.setOptions({ lang: { numericSymbols:

How can I change the colors of my highcharts piechart?

我的未来我决定 提交于 2019-11-28 19:06:05
I'm using highcharts to make a piechart but I'm having trouble loading a custom color set for my chart. Here is my code: <script type="text/javascript"> $(function () { Highcharts.setOptions({ colors: ['#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4'] }); return new Highcharts.Chart({ chart: { renderTo: 'trailpiechart', plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false, backgroundColor: "#f8f8f8", margin: [20, 20, 20, 20] }, credits: { enabled: false }, title: { text: caption }, tooltip: { formatter: function () { return this.y + ' links'

How can I fix Highcharts error #13?

一个人想着一个人 提交于 2019-11-28 13:23:25
I use highchart so, the user can close and open the chart page and redraw the chart, in some case give me this error, how can I fix it, Thanks Here is my code function populateGraph(graph1data1,graph1data2,id,time,bottomText,tickinterval){ $(function () { $('#'+id).highcharts({ chart: { type: 'line' }, xAxis: { tickWidth: 0, categories: ['1,2,3,4'] }, yAxis: { gridLineColor: '#fff', title: { text: '' }, labels: { formatter: function() { return ''; } } }, navigation: { buttonOptions: { enabled: false } }, series: [{ name: 'This ', data: [1,2,3,4], color: '#1e71ef' }, { name: 'Last ', data: [5,6

which rangeSelector button is selected in highcharts

独自空忆成欢 提交于 2019-11-28 13:00:36
I want to know how to determine which rangeSelector button is selected in highstock. my rangeSelector buttons: buttons: [{ type: 'month', count: 1, text: '1 MONTH', }, { type: 'month', count: 3, text: '3 MONTH' }, { type: 'month', count: 6, text: '6 MONTH' }, { type: 'ytd', text: 'YTD' }, { type: 'year', count: 1, text: '1 YEAR' }, { type: 'all', text: 'ALL' }], for example I click on my first rangeSelector that is 1 MONTH. I want to know if this button is selected or not. Is there any event? Thanks You can catch setExtremes() ( http://api.highcharts.com/highstock#xAxis.events.setExtremes ),

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

走远了吗. 提交于 2019-11-28 12:35:41
问题 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

Highstock/Highchart cannot set Individual Point color

会有一股神秘感。 提交于 2019-11-28 04:07:56
问题 I am working on Highstock, I am trying to set a color to a specific point in "data" in Highstock, like in the example, but I couldn't get it to work, no matter how I set the color, it doesn't show on the graph. I have tried the option with Highchart API, it works, but it doesn't work with Highstock. jsfiddle link(what I have tried) Is it because I am using x, y to specify the point? Please help. 回答1: If you look to your demo you'll see that using color it sets the tooltip color and not the

Highcharts - Show tooltip on points click instead mouseover

。_饼干妹妹 提交于 2019-11-27 14:55:18
Is it possible to have tool tip on clicking of points instead of mouse move. I have tried with showing values in java script alert as below plotOptions: { series: { cursor: 'pointer', point: { events: { click: function() { alert ('Category: '+ this.category +', value: '+ this.y); } } } } } Requirement is to show high chart tool tip on click. Please help. Thanks! As @PawelFus states, it's not officially supported but you can fudge this in by taking control of the visiblity of the tooltip. First on chart load, hide it: chart: { events: { load: function(){ $('.highcharts-tooltip').hide(); } } },

Highstock highcharts irregular data gets wrong x-scale

雨燕双飞 提交于 2019-11-27 13:04:35
I have irregular data. Chart draws well when I use highcharts : $(function() { var chart = new Highcharts.Chart({ chart: { renderTo: 'chart' }, xAxis: { type: 'datetime' }, series: [{ name: 'Volume', data: chart_arr, }] }); }); http://jsfiddle.net/KnTaw/9/ But I have a lot of data so I need to zoom on the date and choose highstock . Then a strange thing happens: the x-axis become non-linear. $(function() { var chart2 = new Highcharts.StockChart({ chart: { renderTo: 'chart2' }, rangeSelector: { selected: 0 }, xAxis: { type: 'datetime' }, series: [{ name: 'val', data: chart_arr, type : 'area', }