Browse Source

add classes for arcs

merge-requests/1/merge
vargburz 4 years ago
parent
commit
bc9fd9abd1
  1. 10
      src/index.ts

10
src/index.ts

@ -168,6 +168,13 @@ export class ChartwerkGaugePod extends ChartwerkPod<GaugeTimeSerie, GaugeOptions
.data(valueArcs)
.enter()
.append('path')
.attr('class', (d: object, i: number) => {
if(i === 0) {
return 'value-arc';
} else {
return 'backgroung-arc'
}
})
.style('fill', (d: object, i: number) => {
return this._valueArcColors[i];
})
@ -194,6 +201,9 @@ export class ChartwerkGaugePod extends ChartwerkPod<GaugeTimeSerie, GaugeOptions
.data(stopArcs)
.enter()
.append('path')
.attr('class', (d: object, i: number) => {
return `stop-arc-${i}`;
})
.style('fill', (d: object, i: number) => {
return this._colors[i];
})

Loading…
Cancel
Save