Browse Source

0.7.8 && render segments if exists

main
vargburz 2 months ago
parent
commit
b3e7f943ad
  1. 2
      package.json
  2. 8
      src/index.ts

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "@chartwerk/line-pod", "name": "@chartwerk/line-pod",
"version": "0.7.7", "version": "0.7.8",
"description": "Chartwerk line chart", "description": "Chartwerk line chart",
"main": "dist/index.js", "main": "dist/index.js",
"files": [ "files": [

8
src/index.ts

@ -45,13 +45,15 @@ class LinePod extends ChartwerkPod<LineTimeSerie, LineOptions> {
const generator = this.getRenderGenerator(serie.renderArea, serie.yOrientation); const generator = this.getRenderGenerator(serie.renderArea, serie.yOrientation);
this._renderMetric(serie, generator); this._renderMetric(serie, generator);
} }
if(this._markersConf !== undefined) { if(!_.isEmpty(this._markersConf)) {
this._markersLayer = new Markers(this.d3Node, this._markersConf, this.state, this.margin); this._markersLayer = new Markers(this.d3Node, this._markersConf, this.state, this.margin);
this._markersLayer.render(this.metricContainer, this.height); this._markersLayer.render(this.metricContainer, this.height);
} }
this._segmentsLayer = new Segments(this._segmentSeries, this.state); if(!_.isEmpty(this._segmentSeries)) {
this._segmentsLayer.render(this.metricContainer, this.chartContainer); this._segmentsLayer = new Segments(this._segmentSeries, this.state);
this._segmentsLayer.render(this.metricContainer, this.chartContainer);
}
} }
clearAllMetrics(): void { clearAllMetrics(): void {

Loading…
Cancel
Save