Browse Source

fix renderDots not working for right y-axis

pull/68/head
rozetko 5 months ago
parent
commit
121f7a0305
  1. 2
      package.json
  2. 4
      src/index.ts
  3. 10
      yarn.lock

2
package.json

@ -19,7 +19,7 @@
"author": "CorpGlory",
"license": "ISC",
"dependencies": {
"@chartwerk/core": "^0.6.25"
"@chartwerk/core": "^0.6.26"
},
"devDependencies": {
"copy-webpack-plugin": "^11.0.0",

4
src/index.ts

@ -88,7 +88,7 @@ class LinePod extends ChartwerkPod<LineTimeSerie, LineOptions> {
if(renderArea) {
return yOrientation === yAxisOrientation.LEFT ? this.areaGenerator : this.areaGeneratorY1;
}
return yOrientation === yAxisOrientation.LEFT ? this.lineGenerator : this.areaGeneratorY1;
return yOrientation === yAxisOrientation.LEFT ? this.lineGenerator : this.lineGeneratorY1;
}
_renderDots(serie: LineTimeSerie): void {
@ -101,7 +101,7 @@ class LinePod extends ChartwerkPod<LineTimeSerie, LineOptions> {
.attr('r', METRIC_CIRCLE_RADIUS)
.style('pointer-events', 'none')
.attr('cx', d => this.state.xScale(d[0]))
.attr('cy', d => this.state.yScale(d[1]));
.attr('cy', d => this.state.getYScaleByOrientation(serie.yOrientation)(d[1]));
}
_renderLines(serie: LineTimeSerie): void {

10
yarn.lock

@ -5,13 +5,13 @@ __metadata:
version: 6
cacheKey: 8
"@chartwerk/core@npm:^0.6.25":
version: 0.6.25
resolution: "@chartwerk/core@npm:0.6.25"
"@chartwerk/core@npm:^0.6.26":
version: 0.6.26
resolution: "@chartwerk/core@npm:0.6.26"
dependencies:
d3: ^5.16.0
lodash: ^4.17.21
checksum: 08a638c26c99bf5f0e91d8acb136406aa5968ea720a590e0c9fdbe25cec326806e25f2b2457d0feee9bec6f8933f8ae1e1def5226a83c3effa18352de9c127af
checksum: d77ef83701dc13cf2b7fb36dc96448060b6301928bcc0730a7150930f83c51f295e176bcda4e1b8cb8f56d15fef5696edfe6f4e1033adbb5ef5d3487a02c3390
languageName: node
linkType: hard
@ -19,7 +19,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@chartwerk/line-pod@workspace:."
dependencies:
"@chartwerk/core": ^0.6.25
"@chartwerk/core": ^0.6.26
copy-webpack-plugin: ^11.0.0
css-loader: ^6.8.1
style-loader: ^3.3.3

Loading…
Cancel
Save