sync-gitlab 0.6.6 #1

Merged
vargburz merged 4 commits from sync-gitlab into main 2 years ago
  1. 2
      package.json
  2. 7
      src/index.ts

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "@chartwerk/line-pod", "name": "@chartwerk/line-pod",
"version": "0.6.5", "version": "0.6.6",
"description": "Chartwerk line chart", "description": "Chartwerk line chart",
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {

7
src/index.ts

@ -290,14 +290,13 @@ export class LinePod extends ChartwerkPod<LineTimeSerie, LineOptions> {
let points = []; // datapoints in each metric that is closest to xValue/yValue position let points = []; // datapoints in each metric that is closest to xValue/yValue position
this.series.visibleSeries.forEach((serie: LineTimeSerie) => { this.series.visibleSeries.forEach((serie: LineTimeSerie) => {
const closestDatapoint = this.getClosestDatapoint(serie, xValue, yValue); const closestDatapoint = this.getClosestDatapoint(serie, xValue, yValue);
if(closestDatapoint === undefined) { if(_.isNil(closestDatapoint) || _.isNil(closestDatapoint[0])) {
this.hideCrosshairCircle(serie.idx); this.hideCrosshairCircle(serie.idx);
return; } else {
}
const xPosition = this.state.xScale(closestDatapoint[0]); const xPosition = this.state.xScale(closestDatapoint[0]);
const yPosition = this.state.yScale(closestDatapoint[1]); const yPosition = this.state.yScale(closestDatapoint[1]);
this.moveCrosshairCircle(xPosition, yPosition, serie.idx); this.moveCrosshairCircle(xPosition, yPosition, serie.idx);
}
points.push({ points.push({
value: closestDatapoint, value: closestDatapoint,

Loading…
Cancel
Save