I am looking for a charting library that supports creating graphs with missing data.
A bit of an odd request, but required for my application as my DB doesn't always have a complete data set.
I'm currently using ChartJS to create a line graph, however because there are holes in my data, it is causing my graph to look quite messy.
The graph contains months on the x axis, and a users score on the y axis. There is one year of data, broken in months... and then the user score ranges from 0 - 10
However, sometimes I end up with months with no data, and it is causing NaN for that month. Does anyone know of a graph library that supports missing data, or a work around solution for such an issue?
You actually refer to chart.js
ChartJS supports missing data
Related
I am building stock charts with AnyChart and I am stuck in a problem.
I get my data mapping directly from a third party data provider and it works perfectly. I have built a chart where users can draw, insert figures etc. The users are requesting a solution where they can draw into the future and scroll into dates later than the newest date in the data. The problem for me is that the chart date range selector is following the dates in the data mapping - so my question is if it's possible to set the date rangeSelector manually?
An example can be seen here: https://www.tradingview.com/symbols/OMXCOP-BO/
On the example you can just scroll to the right and into future dates even though the data is not following.
Does anyone have any idea how to make this work with anychart?
Thanks :-)
To achieve that you can use minimumGap() and maximumGap() functions. The article with live samples describes how it works.
So I have a site where I am doing some data modeling using plotly.js. I am plotting a large number of points (in the thousands). on my backend, I calculate regression equations for the points, and generate coordinates for each x value on the graph. When I plot the equation points in a plotly.js trace, I sometimes get extremely weird results such as
Which is supposed to be a polynomial curve where I get the points using the equation
yPoints.push((quad[0] * (m*m)) + (quad[1] * m) + quad[2])
Where quad[0] quad[1] and quad[2] are the coeffecients that I got from determining the regression analysis.
I am not sure why I am getting such weird graph results for certain sets of coordinates. Does anybody have any idea why?
Alternatively does anybody know of any way to plot a function in a plotly.js graph using either plotly or a third party?
let me know if you need any more info.
Thanks for the help!
Thanks for all of the comments NVRM. As it turns out it wasn't an SVG issue. It wasn't even a plotly issue. The issue was with my data. I have a database which I query for the data that I used to generate the trendline (the points on the graph). For some reason occasionally the y value of the points that I am generating was NULL. This was causing some oddities with the regression calculations, and there were some outliers generated when the value was NULL.
There is still a few oddities with the graph, but the main one is resolved by removing the values with NULL from the trendline consideration.
The moral of the story is always check your data kids.
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?
I'm currently working on building a charting web application, and I've chosen dygraphs for my time series data (Two weeks of data at an hourly level, if anyone finds this information relevant). On the same page, I also have a couple of customized d3.js charts that pull metrics from the same database as the trendline.
I want to know if I will be able to link the selection on my dygraph line (Supposing I zoom in on 3 hours worth of data, i.e., 3 rows) - to my d3 charts, so that the data in the d3 charts also get filtered down to the date range chosen by zooming in?
I'm quite the amateur here, and apologize if my question seems vague, but any sense of direction would be helpful.
I'm guessing I should be able to do this by modifying some class in the dygraphs source code, or reference the same from my d3 chart.
Thanks.
You shouldn't have any trouble doing this. There's no need to modify the dygraphs source. You can implement handlers on the dygraph object (zoomHandler or drawCallback, most likely) which update the D3 chart.
See this demo for an example of synchronization between multiple dygraphs.
I'm trying to plot oscilloscope time traces using highcharts/highstock. The problem is highstock only takes the xAxis as date values. I can't figure out how to force it to only use seconds (because then I could just change the label to nanoseconds).
Highcharts on the other hand can plot anything really but doesnt have the advanced data grouping features that I need to plot these long (and sometimes concatenated - i.e. SUPER long) time traces.
I could go server side with it but I don't think anything beats highcharts in terms of usability and flexibility.
Anyone have any advice?
Have you consider to modify labels, by formatter ?
http://api.highcharts.com/highstock#xAxis.labels.formatter
http://api.highcharts.com/highstock#highcharts.dateFormat()