Skip to content
This repository was archived by the owner on Jul 29, 2019. It is now read-only.
This repository was archived by the owner on Jul 29, 2019. It is now read-only.

Timeline rolling mode breaks graph2D #2467

@Tooa

Description

@Tooa

This pull request to the develop branch breaks parts of the graph2D component. See the following for details:

<!doctype html>
<html lang="us">
<body>
    <head>
        <script type='text/javascript'  src="./vis.js"></script>
        <link href="vis.css" rel="stylesheet" type="text/css" />
   
        <div id="visualization"></div>
<script type="text/javascript">
    var container = document.getElementById('visualization');
  var items = [
    {x: '2014-06-11', y: 10},
    {x: '2014-06-12', y: 25},
    {x: '2014-06-13', y: 30},
    {x: '2014-06-14', y: 10},
    {x: '2014-06-15', y: 15},
    {x: '2014-06-16', y: 30}
  ];

  var dataset = new vis.DataSet(items);
  var options = {
    start: '2014-06-10',
    end: '2014-06-18'
  };
  var graph2d = new vis.Graph2d(container, dataset, options);
</script>
</body>
</html>

Causes

Uncaught TypeError: Cannot read property 'start' of undefined
    at Range (Range.js:17)
    at Graph2d (Graph2d.js:82)
    at problem.html:25

The problem is that graph2D creates the Range here with this.body and without an option hence the latter optional.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions