Skip to content

Commit

Permalink
add attribute 'display-legend' for area plot
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey1024 committed May 16, 2016
1 parent 4ad76ba commit ff23988
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/idd/idd.area.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ InteractiveDataDisplay.Area = function (div, master) {
// Initialization (#1)
var initializer = InteractiveDataDisplay.Utils.getDataSourceFunction(div, InteractiveDataDisplay.readCsv);
var initialData = initializer(div);
var displayInLegend = $(div).attr("display-legend") == "false" ? false : true;


this.base = InteractiveDataDisplay.CanvasPlot;
this.base(div, master);
Expand Down Expand Up @@ -143,6 +145,8 @@ InteractiveDataDisplay.Area = function (div, master) {
};

this.getLegend = function () {
if (!displayInLegend)
return undefined;
var that = this;
var canvas = $("<canvas></canvas>");
canvas[0].width = 40;
Expand Down

0 comments on commit ff23988

Please sign in to comment.