highstock

How can I change the colors of my highcharts piechart?

孤者浪人 提交于 2019-12-17 22:38:55
问题 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: {

How can I fix Highcharts error #13?

匆匆过客 提交于 2019-12-17 21:01:22
问题 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

Highcharts - Show tooltip on points click instead mouseover

让人想犯罪 __ 提交于 2019-12-17 12:37:48
问题 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! 回答1: As @PawelFus states, it's not officially supported but you can fudge this in by taking control of the visiblity of the tooltip.

Highstock highcharts irregular data gets wrong x-scale

有些话、适合烂在心里 提交于 2019-12-17 10:47:22
问题 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:

How do you run two different functions in javascript

戏子无情 提交于 2019-12-14 03:30:03
问题 I have two different javascript functions as below. When I call these functions, until the function completes executing, I am showing loading image. The problem I am having is that when first function completes, it should load the chart and the second function runs and load the chart. That's not what's happening. Both charts load when both function completes. I need each function to run and load the chart when each complete not both at the same time. Here is the functions: <script> function

HighStock setup

99封情书 提交于 2019-12-14 00:28:02
问题 I am working with HighStock to create a chart for stocks of various companies. In the API, it does not tell me how to retrieve the data about a stock, it is simply retrieving it in a JSON file. I am wondering if a stock parameter (Example: 'AAPL' or 'GOOG') can be passed in to retrieve this information. HighStock Website HighStock Examples 回答1: The Highcharts/Highstock charts by default have turboThreshold that is used to save on expensive data checking and indexing in long series. So if you

Is it possible to make custom shaped label w/o use of html in highcharts?

白昼怎懂夜的黑 提交于 2019-12-13 07:53:15
问题 I have animated moving label plotbandLabel.animate({ y : yAxis.toPixels(y) - labelOffset }, { duration : 500, step : function () { this.attr({ text : yAxis.toValue(this.y + labelOffset).toFixed(2), zIndex : 999999999 }) }, complete : function () { this.attr({ text : y.toFixed(2), zIndex : 999999999 }) } }); Here is the full example: http://jsfiddle.net/7yo3nht4/ And I need this label to be shaped like an arrow: 回答1: If you omit fill property in renderer.label the label's box won't be created:

bubble chart with highstock

ⅰ亾dé卋堺 提交于 2019-12-13 07:14:39
问题 Can we do a bubble chart with highstock ?? if yes i need help please because i do it but it didn't work: $(function () { $('#container').highcharts('StockChart',{ chart: { type: 'bubble', }, title: { text: 'Highcharts Bubbles' }, series: [{ data: [[Date.UTC(1970, 9, 27),97,36,79], [Date.UTC(1970, 10, 10),94,74,60], [Date.UTC(1970, 10, 18),68,76,58], ] }] }); }); thank you 回答1: You must use: <script src="http://code.highcharts.com/stock/highstock.js"></script> <script src="http://code

HighCharts Export Breaks After Resetting Chart Options

守給你的承諾、 提交于 2019-12-13 07:11:28
问题 On initial load of a page we set the chart options and create the chart. We allow the user to manipulate which series items are shown/hidden and also to change what the type of each series is. We also have a "Reset Chart" action that will revert the chart back to its original load setup. Once the user resets the chart any changes made to chart are not reflected on the exported image except if the user has changed their series chart type. An example jsFiddle is here that demonstrates this

handle rangeSelector button when it is out of range of xaxis of data series

℡╲_俬逩灬. 提交于 2019-12-13 07:01:05
问题 Minimum range of x-axis of data series is 5/15/2006 I send the current max value of x-axis of display chart is 5/24/2011 and zoom button is selected as past 7 days, then if I select the zoom button past 30 days, because it is out of the range of x-axis, so I want it to make this select invalid and keep the old past 7 days zoom button and the range of display chart doesn't change. how to do this? Here is the JS code: var end = 1148428800000; var rowcount; $(function () { $.getJSON('http://www