|
|
@ -5,6 +5,7 @@ import { Segments } from './components/segments'; |
|
|
|
|
|
|
|
|
|
|
|
import { LineSeries } from './models/line_series'; |
|
|
|
import { LineSeries } from './models/line_series'; |
|
|
|
import { MarkersConf } from './models/marker'; |
|
|
|
import { MarkersConf } from './models/marker'; |
|
|
|
|
|
|
|
import { SegmentSerie } from './models/segment'; |
|
|
|
|
|
|
|
|
|
|
|
import * as d3 from 'd3'; |
|
|
|
import * as d3 from 'd3'; |
|
|
|
import * as _ from 'lodash'; |
|
|
|
import * as _ from 'lodash'; |
|
|
@ -29,7 +30,7 @@ class LinePod extends ChartwerkPod<LineTimeSerie, LineOptions> { |
|
|
|
_series: LineTimeSerie[] = [], |
|
|
|
_series: LineTimeSerie[] = [], |
|
|
|
_options: LineOptions = {}, |
|
|
|
_options: LineOptions = {}, |
|
|
|
private _markersConf?: MarkersConf, |
|
|
|
private _markersConf?: MarkersConf, |
|
|
|
private _segmentSeries = [], |
|
|
|
private _segmentSeries: SegmentSerie[] = [], |
|
|
|
) { |
|
|
|
) { |
|
|
|
super(_el, _series, _options); |
|
|
|
super(_el, _series, _options); |
|
|
|
this.series = new LineSeries(_series); |
|
|
|
this.series = new LineSeries(_series); |
|
|
@ -393,6 +394,14 @@ class LinePod extends ChartwerkPod<LineTimeSerie, LineOptions> { |
|
|
|
this.onMouseOver(); |
|
|
|
this.onMouseOver(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateMarkers(markersConf: MarkersConf): void { |
|
|
|
|
|
|
|
this._markersConf = markersConf; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateSegments(segments: SegmentSerie[]): void { |
|
|
|
|
|
|
|
this._segmentSeries = segments; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// methods below rewrite s, (move more methods here)
|
|
|
|
// methods below rewrite s, (move more methods here)
|
|
|
|
protected zoomOut(): void { |
|
|
|
protected zoomOut(): void { |
|
|
|
if(d3.event.type === 'dblclick' && !this.isDoubleClickActive()) { |
|
|
|
if(d3.event.type === 'dblclick' && !this.isDoubleClickActive()) { |
|
|
|