Jqplot chart with 2 series not displayed correctly - javascript

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

Related

How to get X-Axis value of google area chart without using chart.getSelection method

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

Plot multiple irregular timeseries on same line chart dojo

I am looking to create a line chart which will plot an array of data which has a corresponding x value (date/time) and y value associated with it. The chart can have any number of series (different lines on the same graph). You can think of this as like how yahoo/google graph a particular stock and if you want to compare different companies stock prices on the same chart.
The problem I am facing is that the data I am given might not be given in regular intervals (e.g. series 1 might give an array of plots that occur every 15 mins, series2 might be 10 mins, etc). Also the data might not have the same start / end time (e.g. series 1 starts at 8:40 am, series 2 starts at 8:42 am). There can also be holes in the data where no data was gathered (want to display this as nothing in the chart)
I have thought about some potential ways to solve this problem
Put everything on a 1 minute interval (the smallest possible interval) and place null values for everything we do not have data for. I need to have null values because there are datatips on the graph when you hover over a point to tell you what the value is at that point. The problem with this is that this will cause the graph to become a point graph rather than a line graph and will look ugly. I can tell dojo to interpret the data between null values but I also want to have explicit null values (e.g. when the market is not open leave the space as nothing rather than connecting the lines)
Round the data to the closest interval. The problem with this is the data is no longer accurate for that particular moment which is a problem.
Don't allow them to be plotted together (not an option).
Use a different charting library (last resort)
I am using the dojox charting library and I cannot change the back end code that gives me the data.
What are my options?

Javascript Charting scaling multiple series

I need to display a javascript chart with up to 8 series that vary wildly in values. Some of the series will display 0-1 values, and the rest of them could be anywhere from 0-1000000.
How can I display this data simultaneously on a Javascript chart? The problem I run into with jqPlot (what I'm used to) is it will display all the series but it's impossible to tell the values that go from 0-1 apart from each other and whether they are 0 or 1 at that moment in time.
X axis will always be a datetime range.
I'm used to jqPlot but couldn't figure out a way to do it. I'm open to other javascript solutions.

highcharts reversed x-axis label stepping

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.

Problems with range selector on highcharts (highstock)

I'm using two different charts of highstock, both of them have 2 series. Both charts are loaded in the same div depends which button is selected. To do this I set the series data when the user push the other buttons, the problem that I'm having is that in one chart I can select a minimum range of about 10 minutes, but in the other chart I can't select a range lower than one hour. Both are made with the same settings, the only different is that one have numbers with decimals and the other don't.
I want that you can select a range, change graph and keep in the other the selection. This work when the selection is bigger than 1 hour.
Hope you can help me.
You can try to use setExtremes() function which allows to define range.
http://api.highcharts.com/highstock#xAxis.events.setExtremes

Categories