File: border.js

package info (click to toggle)
dygraphs 2.2.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,340 kB
  • sloc: javascript: 24,842; sh: 800; python: 581; makefile: 45
file content (21 lines) | stat: -rw-r--r-- 592 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*global Gallery,Dygraph,data */
//galleryActive=false
Gallery.register(
  'border',
  {
    name: "Border test",
    title: 'Graph stays within the border',
    setup: function(parent) {
      parent.innerHTML =
          "<style>.dygraph-legend { border: 1px solid black; }</style>" +
          "<div id='bordered' style='border: 1px solid red; width:600px; height:300px;'></div>";
    },
    run: function() {
      new Dygraph(document.getElementById('bordered'), data,
      {
        title: 'Chart Title',
        xlabel: 'Date',
        ylabel: 'Temperature (F)'
      });
    }
  });