Use CSS styles instead of labelsDivStyles
authorPetr Shevtsov <petr.shevtsov@gmail.com>
Thu, 13 Nov 2014 10:35:08 +0000 (13:35 +0300)
committerPetr Shevtsov <petr.shevtsov@gmail.com>
Thu, 13 Nov 2014 14:37:36 +0000 (17:37 +0300)
tests/customLabelFollow.html

index 931e555..90c762f 100644 (file)
     <script type="text/javascript" src="../dygraph-dev.js"></script>
 
     <script type="text/javascript" src="data.js"></script>
+    <style type="text/css">
+      .dygraph-legend {
+        background-color: rgba(200, 200, 255, 0.75) !important;
+        padding: 4px;
+        border: 1px solid #000;
+        border-radius: 10px;
+        box-shadow: 4px 4px 4px #888;
+        pointer-events: none;
+      }
+    </style>
   </head>
   <body>
     <p>Legend follows highlighted points:</p>
               rollPeriod: 14,
               errorBars: true,
               labelsDivWidth: 100,
-              labelsDivStyles: {
-                'backgroundColor': 'rgba(200, 200, 255, 0.75)',
-                'padding': '4px',
-                'border': '1px solid black',
-                'borderRadius': '10px',
-                'boxShadow': '4px 4px 4px #888',
-                'pointerEvents': 'none' // let mouse events fall through to the chart
-              },
               labelsSeparateLines: true,
               legendFollow: true,
               yAxisLabelWidth: 20