From 01eefc89a74dee9eba75a915cc1b7638fa7e796b Mon Sep 17 00:00:00 2001 From: Alexey Velikiy Date: Fri, 29 Oct 2021 15:41:17 +0300 Subject: [PATCH] original ping color of labeling :) --- client/src/components/hastic_pod/index.ts | 7 ++++--- client/src/types/colors.ts | 2 +- client/src/types/detection.ts | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/client/src/components/hastic_pod/index.ts b/client/src/components/hastic_pod/index.ts index 586cfd8..3937232 100644 --- a/client/src/components/hastic_pod/index.ts +++ b/client/src/components/hastic_pod/index.ts @@ -1,6 +1,7 @@ import { AxisRange } from "@chartwerk/core/dist/types"; import { LinePod, LineTimeSerie } from "@chartwerk/line-pod"; import { SegmentsSet } from "@/types/segment_set"; +import { ANALYTIC_UNIT_COLORS } from "@/types/colors" import { Segment, SegmentId } from "@/types/segment"; export type TimeRange = { from: number, to: number }; @@ -110,8 +111,8 @@ export class HasticPod extends LinePod { } protected renderSegments() { - let segments = this._segmentSet.getSegments(); - for (let s in segments) { + const segments = this._segmentSet.getSegments(); + for (const s in segments) { console.log(s); } } @@ -129,7 +130,7 @@ export class HasticPod extends LinePod { .attr('y', y) .attr('width', w) .attr('height', h) - .attr('fill', 'red') + .attr('fill', ANALYTIC_UNIT_COLORS[0]) .attr('opacity', '0.8') } diff --git a/client/src/types/colors.ts b/client/src/types/colors.ts index bc4b013..7c917fe 100644 --- a/client/src/types/colors.ts +++ b/client/src/types/colors.ts @@ -8,7 +8,7 @@ export const OK_COLOR = 'rgba(11, 237, 50, 1)'; export const NO_DATA_COLOR = 'rgba(150, 150, 150, 1)'; export const REGION_FILL_ALPHA = 0.09; -let colors = [ +const colors = [ '#7EB26D', '#EAB839', '#6ED0E0', diff --git a/client/src/types/detection.ts b/client/src/types/detection.ts index 6df361a..4be1a24 100644 --- a/client/src/types/detection.ts +++ b/client/src/types/detection.ts @@ -4,7 +4,7 @@ export enum DetectionStatus { READY = 'READY', RUNNING = 'RUNNING', FAILED = 'FAILED' -}; +} export type DetectionSpan = { id: AnalyticUnitId,