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.

itemSet is not defined for graph2D #2469

@Tooa

Description

@Tooa

This issue was introduced in a32a7f7.

<!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 'initialItemSetDrawn' of undefined

Related code

this.on('_change', function (properties) {
    if (me.itemSet.initialItemSetDrawn && properties && properties.queue == true) {
      me._redraw()
    } else {
      me._origRedraw();
    }
  }); 

The graph2D component uses this code too, but has no me.itemSet.

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