projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Migrate most of core dygraphs to ES6 modules.
[dygraphs.git]
/
src
/
plugins
/
legend.js
diff --git
a/src/plugins/legend.js
b/src/plugins/legend.js
index
3db4d07
..
95a161c
100644
(file)
--- a/
src/plugins/legend.js
+++ b/
src/plugins/legend.js
@@
-5,7
+5,6
@@
*/
/*global Dygraph:false */
*/
/*global Dygraph:false */
-Dygraph.Plugins.Legend = (function() {
/*
Current bits of jankiness:
- Uses two private APIs:
/*
Current bits of jankiness:
- Uses two private APIs:
@@
-18,6
+17,8
@@
Current bits of jankiness:
/*global Dygraph:false */
"use strict";
/*global Dygraph:false */
"use strict";
+import * as utils from '../dygraph-utils';
+
/**
* Creates the legend, which appears when the user hovers over the chart.
/**
* Creates the legend, which appears when the user hovers over the chart.
@@
-271,7
+272,7
@@
legend.generateLegendHTML = function(g, x, sel_points, oneEmWidth, row) {
for (i = 0; i < sel_points.length; i++) {
var pt = sel_points[i];
if (pt.yval === 0 && !showZeros) continue;
for (i = 0; i < sel_points.length; i++) {
var pt = sel_points[i];
if (pt.yval === 0 && !showZeros) continue;
- if (!
Dygraph
.isOK(pt.canvasy)) continue;
+ if (!
utils
.isOK(pt.canvasy)) continue;
if (sepLines) html += "<br/>";
var series = g.getPropertiesForSeries(pt.name);
if (sepLines) html += "<br/>";
var series = g.getPropertiesForSeries(pt.name);
@@
-361,6
+362,4
@@
generateLegendDashHTML = function(strokePattern, color, oneEmWidth) {
return dash;
};
return dash;
};
-
-return legend;
-})();
+export default legend;