almende / vis

⚠️ This project is not maintained anymore! Please go to https://github.com/visjs
7.85k stars 1.48k forks source link

what does mouse scroll up mean in graph 2d ? #4139

Open kotran88 opened 6 years ago

kotran88 commented 6 years ago

https://imgur.com/a/TZYDQHB

above is a graph image shown as below data

var items = [
  {x: '2018-09-27T09:00', y: 10},
  {x: '2018-09-27T10:00', y: 10},
  {x: '2018-09-27T11:00', y: 10},
  {x: '2018-09-27T12:00', y: 10},
  {x: '2018-09-27T13:00', y: 10},
  {x: '2018-09-27T14:00', y: 10},
  {x: '2018-09-27T15:00', y: 10},
  {x: '2018-09-27T19:00', y: 16},
  {x: '2018-09-27T20:00', y: 15},
  {x: '2018-09-27T21:00', y: 18},
  ];
  var dataset = new vis.DataSet(items);
  var options = {
    start: '2018-09-27',
    end: '2018-09-28'
  };

it works quite well as I expected... but it miss time on X label 19:00, 21:00 etc ... so I thought zoom in would show all the time that I wrote on code but when I zoom in, it changes totally different way.

https://imgur.com/a/h5GDGmD I think led vertical line say local time zone, but it changed and x label I wrote and x label shown is different.

how can I see all the x label on graph that I wrote in my code ?

DavidSpackman commented 6 years ago

I get the same issue with zoom that the points move, but the timeline doesnt move. It may be a bug.

red vertical line is current time (See docs) Name | Type | Default | Description showCurrentTime | Boolean | true | Show a vertical bar at the current time.

There is a label example here: http://visjs.org/graph2d_examples.html

  var items = [
  {x: '2018-09-27T09:00+08:00', y: 10, label: {content: "x,y"}},
  {x: '2018-09-27T10:00+08:00', y: 10},
  {x: '2018-09-27T11:00+08:00', y: 10},
  {x: '2018-09-27T12:00+08:00', y: 10},
  {x: '2018-09-27T13:00+08:00', y: 10},
  {x: '2018-09-27T14:00+08:00', y: 10},
  {x: '2018-09-27T15:00+08:00', y: 10},
  {x: '2018-09-27T19:00+08:00', y: 16},
  {x: '2018-09-27T20:00+08:00', y: 15},
  {x: '2018-09-27T21:00+08:00', y: 18},
  ];
  var dataset = new vis.DataSet(items);
  var options = {
    start: '2018-09-27T00:00+08:00',
    end: '2018-09-29T00:00+08:00'
  };