I have several highcharts graphs that display data over a date-range that can be customized by the user. In cases where the range specified is very long and granular, I tell highcharts to skip x-axis labels by setting xAxis.options.labels.step to some value n.
My problem is that this usually results in the last date on the x-axis not being displayed. Highcharts will by default always show the first (left-most) date, then show every nth label up to the edge of the graph, but this won't always include the final label.
For my use case, I would prefer the opposite: I want the final date to always be displayed and then show every nth date moving to the left, not necessarily including the first date. Is there a knob I'm missing that would allow me to tweak highcharts to obtain this behavior?
Thanks!
I decided to use tickPositioner and just apply the date formatting manually. I managed to find a way to do this such that the x-axis labels show up appropriately.
Related
I need to find resolution of graph.for that I need first two values from X-axis values(which is time values) displayed on google chart but without any click events like chart.getSelection()graph example given here.
Also values keep changing when graph zoomed hence values are dynamic.Thankyou
I'm trying to manually update highstock date filter using js. I have tried updating the inputs but that doesn't seem to really work, so I wonder if it is even possible.
That inputs are directly connected to the first xAxis on the chart. In other words, to update them (and also actual range on the chart) use chart.xAxis[0].setExtremes(min, max).
Note: min and max values have to be timstamps.
I want to access the points of an NVD3 line chart independently, so I may hide/show them selectively, and pass them metadata to display in their tooltips.
I have a chart with an X-axis showing hours, 0-24. I wish to be able to selectively hide/show point markers at only select hours, to indicate some type of event has occurred at that time.
I am looking for a way, preferably, to get all the points as an array, iterate through them, determine if they should be hidden or shown, and manipulate their colour, and metadata for their tooltip.
I don't see any examples of being able to select all the points, but I know there must be a way.
Thanks for your help!
I have a jqplot graph that I'm using to display 2 series next to each other. The X-axis is based on a date element and the Y-axis on a percentage value that ranges between -10% en 10%, but that's not really relevant.
Both series have the same number of elements and the x-axis value is identical for each entry of the two series, but the result I'm getting is this.
It seems that some elements in the collection of elements that I'm passing on to the jqplot library have some corrupt data (on the x-axis, so the date value in my case), but I've checked the collection of elements and it is sorted on the date, Not sure why it's not being rendered correctly though.
Has anyone else here had a similar problem?
Thanks
I am using Highstock.js to build a stock ticker that spans three days. I am using a line to graph the S & P 500 vs time, and I have a data point for every minute the market is open. I also have a feed sending a new data point every minute. When the page loads the previous two days of data is loaded into the chart, plus all the data available so far today. Then I update with new data each minute.
All data is displayed correctly, but I am trying to split the x-axis into thirds (with no gaps). Each third would correspond to each day. This means the last third would only be partially filled while the current day's data is coming in. The line graph would be moving toward the edge of the chart.
The issue I am running into is that the line always fills the entire chart.
I have tried setting the xAxis.max, but this doesn't work unless I set xAxis.ordinal = false. but that leaves gaps for nights, weekends, holidays, etc...
I have also tried sorting and ignoring the x value, but it has become a headache to account for weekends and holidays. Plus I don't know how to get the axis labels back to the correct time.
Basically I'm asking, Is it possible to create a chart that is only partially filled, without ordinal = false