I'm trying to display a dynamic stockchart with push-data, but unfortunately for some reason the chart only displays the open-values of the data-array, which is problematic for push-values since only the close-values are pushed. Is there a way to avoid that?
You have your chart series set as type 'line'.
A line is only going to show you one value.
Change the type to 'ohlc'
http://jsfiddle.net/jlbriggs/LaKBQ/2/
type: 'ohlc',
Related
I have a highstock graph with flags that initially is correctly set.
See on Figure 1:
The graph's data is loaded dynamically when the vertical scroll bar is changed. The only thing that changes is the series data with the function
function afterSetExtremes(e) {
var new_data_to_be_loaded = getNewDataToBeLoaded();
chart.series[0].setData(new_data_to_be_loaded);
}
The new series data is loaded correctly but the flags is incorreclty re-arranged, se the Figure 2:
So what's wrong on the setting, since the chart.series[0].setData just set the series not the previous flags added?
Almost a solution:
I found that setdata(data, false), setting the animation/redraw to false solve the problem of wrong flag positioning.
Take a look at that: http://jsfiddle.net/b6b63nwy/10/
But this did raise another problem: the series tooltip does not appear anymore. Is this a highstocks bug?
The answer:
http://forum.highcharts.com/highstock-usage/bug-series-tooltip-doesn-t-render-when-use-series-setdata-t37593/
=====================================================================
If you take a look at the Series.setData section in the official API, you will find that the second argument is a Boolean property which tells if redraw the chart. Instead of setData, try to use Series.update() function.
API Reference:
http://api.highcharts.com/highcharts/Series.setData
http://api.highcharts.com/highstock/Series.update
Does anyone know the setting in highcharts (I've looked through the API but I can't seem to find it - maybe looking in the wrong place?) where I can disable the chart's ability to resize when I click on a legend item?
http://api.highcharts.com/highcharts#legend
If there are two lines on the graph, and toggle off one of them on the legend, the graph resizes to show the one line full sized. I want to prevent this functionality.
There actually is a simple solution to this provided for by the API:
chart: {
ignoreHiddenSeries: false
}
I'm pretty sure this is the behavior you desire.
In my highchart plots I need to change some attributes of a yAxis. I can do it using update or redraw. But when I use update, it gives me error: "object# has no method 'update'".
Here is the screenshot:[http://tinypic.com/view.php?pic=2hmfoug&s=5]
And when I use chart redraw, it does not adjust ticks properly when there are multiple yAxis.
I have tried to create an example of the problem I am facing, Here is the example: [
http://jsfiddle.net/3MB5n/]
In the above link, In button1, I am using a chart.redraw method and chart axis update method in button2.
With the button 1, gap between yAxis[0] ticks is changing, but it does not adjust the remaining yAxis, like it does in button 2.
So, I have two questions:
Is there a way to solve the above mentioned error if I use chart.redraw
Why I am getting error, when I use chart.yAis update in my code, and the error does not show on jsfiddle? How can I solve it in my code.
I'm developing a chart that have 2 splines and 2 scatter. I use the default tooltip formatter to exhib a tooltip based in the spline data. But when I hover a scatter despite I hide the default tooltip, before show the scatter one, it appears to have triggered again.
How can I prevent the default tooltip to be triggered?
ps: im using Highcharts 3.0.1
EDITED: I tried "chartObj.tooltip.enabled = false" but it didn't work.
If you don't want to show the tooltip for a particular serie in the chart, see if setting
enableMouseTracking: false
on you desired serie's properties does it.
Hope this help.
I solved using this code:
chartObj.tooltip.options.enabled = false;
Setting to "false" when I hover and to "true" on mouseout.
How do I create a simple chart with a single horizontal bar. Xaxis is time and yaxis is one category named execution. I want to show a chart that shows a bar during the times when I have state executing and for states in between I want to display a blank in the same horizontal bar.
What you are looking for, I think, is a Gantt chart. Check out this example: http://jsfiddle.net/highcharts/KNGba/. It is a basic chart with just one element. Now check out this one: http://jsfiddle.net/highcharts/r6emu/. This shows you events during a time line.