highstock

How to add vertical lines to graph with HighStocks or HighCharts?

笑着哭i 提交于 2021-02-10 19:59:15
问题 I have successfully created a chart with HighChart's HighStock. I'm trying to add vertical lines to the chart. I've searched everywhere in HighStock's docs, Stackoverflow and Google on how to do this, but to no avail. I tried HighStock's "flags" but can't create vertical lines with them. I basically want to turn this chart... ... into something like this: Is this even possible? If yes, how? Thanks! 回答1: Yes, These are called plotLines and are easily added like: xAxis: { plotLines: [{ value:

Creating highstock zoom-in/out button

爱⌒轻易说出口 提交于 2021-02-08 10:48:33
问题 I have the following problem - I'm trying to create highstock graphic with zoom-in/zoom-out buttons, but something is wrong with the zooming. When i press the button most of the times the chart zooms to the correct time interval, however, after I press the button a couple more times, the chart starts to behave weird - the animations aren't correct or it doesn't zoom or it zooms to the wrong interval. This is the zooming function: var xAxis = graphic.xAxis[0]; var minimum = xAxis.dataMin; var

Creating highstock zoom-in/out button

北城余情 提交于 2021-02-08 10:47:51
问题 I have the following problem - I'm trying to create highstock graphic with zoom-in/zoom-out buttons, but something is wrong with the zooming. When i press the button most of the times the chart zooms to the correct time interval, however, after I press the button a couple more times, the chart starts to behave weird - the animations aren't correct or it doesn't zoom or it zooms to the wrong interval. This is the zooming function: var xAxis = graphic.xAxis[0]; var minimum = xAxis.dataMin; var

Set background color for only one pane in multi-pane Highstock chart

萝らか妹 提交于 2021-01-27 17:42:46
问题 In this example: http://www.highcharts.com/stock/demo/candlestick-and-volume, is there a way to set the background color of the second pane? For example, if you add plotBackgroundColor: '#FCFFC5' to the chart definition, then both panes become yellow. Is it possible to make only the second (lower) pane yellow? 回答1: it's possible to change the background color for a specific range in your second pane using plotBands. e.g. yAxis : {[ ... plotBands : {color : '#f7d724', from : -50, to : 50}, ...

Highstock Navigator always starts from 1970-1-1

只愿长相守 提交于 2021-01-27 02:58:11
问题 I have problem with Highstock navigator always displaying 1970-1-1 as a start point when creating dynamic series and data... does anyone have encountered this issue and has some workarounds? Here is an example: http://jsfiddle.net/sokarovski/SRtvn/ var $container = $('.canvas'); var chart = new Highcharts.StockChart({ chart: { renderTo: $container[0] }, xAxis: { type: 'datetime' , ordinal: false } }); chart.addSeries({ data: [ [Date.UTC(2013,1,1), 0], [Date.UTC(2013,1,5), 10], [Date.UTC(2013

Highchart / Highstock how to set color of individual ohlc or candle?

白昼怎懂夜的黑 提交于 2021-01-04 05:50:13
问题 I have set up a highstock ohlc with angular 2. But can not set the up and down color for OHLC chart type, for example, green when hclose is increasing and red when it is decreasing. is there any API reference for that or any way to implement? like this below image I want my chart to look like.. 回答1: I found a way like this and its working :-) plotOptions: { ohlc: { color: 'red', upColor: 'green' } }, series : [{ type: 'ohlc', name : 'Stock Price', data : [], yAxis : 0, }, { type: 'column',

How to remove weekend datetime gaps from x-axis of a financial chart?

跟風遠走 提交于 2020-08-23 07:54:08
问题 I have a use case where I pull and plot Forex data in the form of ask and bid on the graph and this is based on minute, hour or day candlesticks and I am only plotting the closing value for bid and ask as a spline . Issue The endpoints that I am using their Forex data feed is not available from Friday 8pm to Sunday 9pm . Let's say I have the following use case Plot a 200 data points (i.e. hourly candle) on the graph at a time, on new candle phase out the oldest and plot the newest The X-Axis

Highstock + Bootstrap datepicker

三世轮回 提交于 2020-03-04 05:21:33
问题 My question is the same as the one here: Highstock date input jquery ui datepicker position changes But I'm using Bootstrap datepicker instead of jQuery. I noticed it has on("show", ... ), on("hide" ...) instead of beforeShow, onClose respectively. But then I don't really know how to change their bodies to work with my datepicker. 回答1: try this setTimeout(function () { $('input.highcharts-range-selector', $(chart.container).parent()) .datepicker({ format: "dd/mm/yyyy", todayBtn: "linked",

Highstock + Bootstrap datepicker

我怕爱的太早我们不能终老 提交于 2020-03-04 05:21:31
问题 My question is the same as the one here: Highstock date input jquery ui datepicker position changes But I'm using Bootstrap datepicker instead of jQuery. I noticed it has on("show", ... ), on("hide" ...) instead of beforeShow, onClose respectively. But then I don't really know how to change their bodies to work with my datepicker. 回答1: try this setTimeout(function () { $('input.highcharts-range-selector', $(chart.container).parent()) .datepicker({ format: "dd/mm/yyyy", todayBtn: "linked",

highcharts与highstock实例

走远了吗. 提交于 2020-02-03 07:33:48
1. highcharts实例代码,其中导出功能没有配置本地化,用的是官方导出接口。 < html > < head > < title > highcharts报表示例 < / title > < meta http - equiv = "Content-Type" content = "text/html; charset=UTF-8" / > < script type = "text/javascript" src = "./js/jquery.min.js" > < / script > < script type = "text/javascript" > $( function () { var chart; $(document).ready( function () { /** * highcharts数据图表 * * @param {object} chart 图表的相关参数配置 * @param {object} credits 图表版权信息参数配置 * @param {object} lang 图表语言参数配置 * @param {object} exporting 导出配置 * @param {object} title 标题配置 * @param {object} xAxis X轴配置 * @param {object} yAxis Y轴配置 *