Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flotr2 mouse track does not work correctly with time points #301

Open
kpeng94 opened this issue Apr 7, 2015 · 0 comments
Open

Flotr2 mouse track does not work correctly with time points #301

kpeng94 opened this issue Apr 7, 2015 · 0 comments

Comments

@kpeng94
Copy link

kpeng94 commented Apr 7, 2015

It seems that Flotr2 mouse tracking does not work with time points. I copy and pasted this into the examples page, located at http://www.humblesoftware.com/flotr2 . The mouse is only able to track points on one of the graphs, but it should be able to track points on both graphs.

(function basic(container) {

  var datas = [
         [[new Date("Thu Jan 01 1903 00:00:00 GMT-0500 (EST)").getTime(), 0.537],
          [new Date("Fri Jan 01 1904 00:00:00 GMT-0500 (EST)").getTime(), 0.609],
          [new Date("Sun Jan 01 1905 00:00:00 GMT-0500 (EST)").getTime(), 0.477],
          [new Date("Mon Jan 01 1906 00:00:00 GMT-0500 (EST)").getTime(), 0.596],
          [new Date("Tue Jan 01 1907 00:00:00 GMT-0500 (EST)").getTime(), 0.473],
          [new Date("Wed Jan 01 1908 00:00:00 GMT-0500 (EST)").getTime(), 0.331]],
         [[new Date('Thu Jan 01 1903 00:00:00 GMT-0500 (EST)').getTime(), 0.659],
          [new Date('Fri Jan 01 1904 00:00:00 GMT-0500 (EST)').getTime(), 0.617],
          [new Date('Sun Jan 01 1905 00:00:00 GMT-0500 (EST)').getTime(), 0.513],
          [new Date('Mon Jan 01 1906 00:00:00 GMT-0500 (EST)').getTime(), 0.318],
          [new Date('Tue Jan 01 1907 00:00:00 GMT-0500 (EST)').getTime(), 0.396],
          [new Date('Wed Jan 01 1908 00:00:00 GMT-0500 (EST)').getTime(), 0.487]]
              ];
  var i, graph;

  // Generate first data set

  // Draw Graph
  graph = Flotr.draw(container, datas, {
    xaxis: {
      mode: "time",
      minorTickFreq: 4
    }, 
    grid: {
      minorVerticalLines: true
    },
    mouse : {
      track : true
    } // this seems to produce a problem
  });
})(document.getElementById("editor-render-0"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant