(new to this) Modifying Time Series demo

95 views
Skip to first unread message

David Grossman

unread,
Aug 31, 2013, 3:13:58 PM8/31/13
to envis...@googlegroups.com
Hello, new to this library and I think it's cool, but I'm not sure how to figure out how to modify it. Are there extensive comments somewhere about what can be specified under options, etc.?

Specifically, I would like to be able to add names to axis, label the axis (with dates, with numbers, etc.), draw a grid of some specified width on the graph, and lastly I'd like to be able to get a reading on mouseover of a plotted datapoint. If there could also be little dots where the data points are rather than the joining of two straight lines from adjacent data points, that would be cool too.

Thanks in advance for your help, awesome library.

David Grossman

unread,
Aug 31, 2013, 11:52:44 PM8/31/13
to envis...@googlegroups.com
Based  on looking at the source code, and in large part due to forked examples I got a lot of stuff working. 
I still have several things to figure out, if you could help that would be awesome. In terms of priority:

For mousetracking, let's say my X value is like a billion, which gets translated from milliseconds to a specific date, how do I get the x-value to be that translated date rather than the untranslated long integer of milliseconds?

How do I implement a grid?

How do I move around graph line labels, title, the y-axis values such that they don't overlap with the graphed data?

Carl Sutherland

unread,
Sep 3, 2013, 9:31:10 AM9/3/13
to envis...@googlegroups.com
Hey David,

For the grid plugin, this is what you're looking for: https://github.com/HumbleSoftware/Flotr2/tree/master/js/plugins  Include the grid.js Flotr2 plugin and you should be able to enable the grid.

For your second question, could you fork this fiddle with your reproduction? http://jsfiddle.net/cesutherland/LurmY/

-Carl



--
You received this message because you are subscribed to the Google Groups "Envision.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to envisionjs+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

David Grossman

unread,
Sep 3, 2013, 1:26:10 PM9/3/13
to envis...@googlegroups.com
Thanks for getting back to me - got a version of the grid working.


As you can see, the tracker doesn't output the corresponding values seen on the y-axis and the x-axis. The x-axis has the date (milliseconds translation into some date) and the tracker has the number of milliseconds, when I want the date.

David Grossman

unread,
Sep 3, 2013, 1:34:41 PM9/3/13
to envis...@googlegroups.com
Also - I noticed something strange. While the grid works it disables the x-plot range select feature of the summary graph and freezes the detail graph as static (this can be recreated by using the code in the fiddle but just with flotr2.min.js included. (But i'm much more interested in making the tracker output the formatted date.)

Carl Sutherland

unread,
Sep 3, 2013, 4:03:44 PM9/3/13
to envis...@googlegroups.com
Here's an update with the trackFormatter option:


Hope this helps!

-c

David Grossman

unread,
Sep 3, 2013, 5:00:18 PM9/3/13
to envis...@googlegroups.com
Thanks, it's definitely an improvement! Still though, is there a way to combine a grid with the timeSeries (bug as described in earlier post persists), or a way to allow the tracking of the xaxis by, for example having the input array for the xaxis be not in milliseconds but an ordered date format of some kind?
Reply all
Reply to author
Forward
0 new messages