feat(dashed lines): Implementing dashed lines

Adding support for dashed lines using jquery.flot.dashes.js
This commit is contained in:
smalik
2016-07-01 13:16:49 -04:00
committed by Daniel Lee
parent 9e13c93379
commit 1a3bc60e69
11 changed files with 309 additions and 4 deletions

View File

@@ -35,6 +35,7 @@ export default class TimeSeries {
isOutsideRange: boolean;
lines: any;
dashes: any;
bars: any;
points: any;
yaxis: any;
@@ -61,6 +62,9 @@ export default class TimeSeries {
applySeriesOverrides(overrides) {
this.lines = {};
this.dashes = {
dashLength: []
};
this.points = {};
this.bars = {};
this.yaxis = 1;
@@ -74,11 +78,20 @@ export default class TimeSeries {
continue;
}
if (override.lines !== void 0) { this.lines.show = override.lines; }
if (override.dashes !== void 0) {
this.dashes.show = override.dashes;
this.lines.lineWidth = 0;
}
if (override.points !== void 0) { this.points.show = override.points; }
if (override.bars !== void 0) { this.bars.show = override.bars; }
if (override.fill !== void 0) { this.lines.fill = translateFillOption(override.fill); }
if (override.stack !== void 0) { this.stack = override.stack; }
if (override.linewidth !== void 0) { this.lines.lineWidth = override.linewidth; }
if (override.linewidth !== void 0) {
this.lines.lineWidth = override.linewidth;
this.dashes.lineWidth = override.linewidth;
}
if (override.dashLength !== void 0) { this.dashes.dashLength[0] = override.dashLength; }
if (override.spaceLength !== void 0) { this.dashes.dashLength[1] = override.spaceLength; }
if (override.nullPointMode !== void 0) { this.nullPointMode = override.nullPointMode; }
if (override.pointradius !== void 0) { this.points.radius = override.pointradius; }
if (override.steppedLine !== void 0) { this.lines.steps = override.steppedLine; }