|
|
@ -23,6 +23,7 @@ import { |
|
|
|
ScrollPanDirection, |
|
|
|
ScrollPanDirection, |
|
|
|
AxisOption, |
|
|
|
AxisOption, |
|
|
|
AxesOptions, |
|
|
|
AxesOptions, |
|
|
|
|
|
|
|
RenderComponent, |
|
|
|
} from './types'; |
|
|
|
} from './types'; |
|
|
|
import { uid } from './utils'; |
|
|
|
import { uid } from './utils'; |
|
|
|
import { palette } from './colors'; |
|
|
|
import { palette } from './colors'; |
|
|
@ -193,6 +194,7 @@ abstract class ChartwerkPod<T extends Serie, O extends Options> { |
|
|
|
this.metricContainer = clipContatiner |
|
|
|
this.metricContainer = clipContatiner |
|
|
|
.append('g') |
|
|
|
.append('g') |
|
|
|
.attr('class', 'metrics-rect'); |
|
|
|
.attr('class', 'metrics-rect'); |
|
|
|
|
|
|
|
this.options.callbackComponentRenderEnd(RenderComponent.METRICS_CONTAINER); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected createSvg(): void { |
|
|
|
protected createSvg(): void { |
|
|
@ -209,6 +211,7 @@ abstract class ChartwerkPod<T extends Serie, O extends Options> { |
|
|
|
|
|
|
|
|
|
|
|
protected renderGrid(): void { |
|
|
|
protected renderGrid(): void { |
|
|
|
this.grid.render(); |
|
|
|
this.grid.render(); |
|
|
|
|
|
|
|
this.options.callbackComponentRenderEnd(RenderComponent.GRID); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected renderAxes(): void { |
|
|
|
protected renderAxes(): void { |
|
|
@ -216,6 +219,7 @@ abstract class ChartwerkPod<T extends Serie, O extends Options> { |
|
|
|
this.renderXAxis(); |
|
|
|
this.renderXAxis(); |
|
|
|
this.renderYAxis(); |
|
|
|
this.renderYAxis(); |
|
|
|
this.renderY1Axis(); |
|
|
|
this.renderY1Axis(); |
|
|
|
|
|
|
|
this.options.callbackComponentRenderEnd(RenderComponent.AXES); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected renderXAxis(): void { |
|
|
|
protected renderXAxis(): void { |
|
|
@ -316,6 +320,7 @@ abstract class ChartwerkPod<T extends Serie, O extends Options> { |
|
|
|
.attr('x2', this.width) |
|
|
|
.attr('x2', this.width) |
|
|
|
.style('pointer-events', 'none'); |
|
|
|
.style('pointer-events', 'none'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.options.callbackComponentRenderEnd(RenderComponent.CROSSHAIR); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected addEvents(): void { |
|
|
|
protected addEvents(): void { |
|
|
@ -363,6 +368,7 @@ abstract class ChartwerkPod<T extends Serie, O extends Options> { |
|
|
|
.attr('cursor', 'crosshair') |
|
|
|
.attr('cursor', 'crosshair') |
|
|
|
.attr('fill', 'none'); |
|
|
|
.attr('fill', 'none'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.options.callbackComponentRenderEnd(RenderComponent.OVERLAY); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected initBrush(): void { |
|
|
|
protected initBrush(): void { |
|
|
@ -449,6 +455,7 @@ abstract class ChartwerkPod<T extends Serie, O extends Options> { |
|
|
|
.attr('height', this.height) |
|
|
|
.attr('height', this.height) |
|
|
|
.attr('x', 0) |
|
|
|
.attr('x', 0) |
|
|
|
.attr('y', 0); |
|
|
|
.attr('y', 0); |
|
|
|
|
|
|
|
this.options.callbackComponentRenderEnd(RenderComponent.CLIP_PATH); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected renderLegend(): void { |
|
|
|
protected renderLegend(): void { |
|
|
@ -487,6 +494,7 @@ abstract class ChartwerkPod<T extends Serie, O extends Options> { |
|
|
|
.text(series[idx].target) |
|
|
|
.text(series[idx].target) |
|
|
|
.on('click', () => this.options.callbackLegendLabelClick(idx)); |
|
|
|
.on('click', () => this.options.callbackLegendLabelClick(idx)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.options.callbackComponentRenderEnd(RenderComponent.LEGEND); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected renderYLabel(): void { |
|
|
|
protected renderYLabel(): void { |
|
|
@ -904,7 +912,7 @@ export { |
|
|
|
ChartwerkPod, VueChartwerkPodMixin, |
|
|
|
ChartwerkPod, VueChartwerkPodMixin, |
|
|
|
PodState, CoreSeries, CoreOptions, CORE_SERIE_DEFAULTS, CORE_DEFAULT_OPTIONS, |
|
|
|
PodState, CoreSeries, CoreOptions, CORE_SERIE_DEFAULTS, CORE_DEFAULT_OPTIONS, |
|
|
|
Margin, Serie, Options, TimeFormat, BrushOrientation, PanOrientation, |
|
|
|
Margin, Serie, Options, TimeFormat, BrushOrientation, PanOrientation, |
|
|
|
AxesOptions, AxisOption, |
|
|
|
AxesOptions, AxisOption, RenderComponent, |
|
|
|
AxisFormat, yAxisOrientation, CrosshairOrientation, ScrollPanOrientation, ScrollPanDirection, KeyEvent, |
|
|
|
AxisFormat, yAxisOrientation, CrosshairOrientation, ScrollPanOrientation, ScrollPanDirection, KeyEvent, |
|
|
|
palette |
|
|
|
palette |
|
|
|
}; |
|
|
|
}; |
|
|
|