From 406e294dacc35cdeddc0d5d1ca428e600f9ffab9 Mon Sep 17 00:00:00 2001 From: Jose Farias Date: Fri, 19 Apr 2024 18:32:47 -0600 Subject: [PATCH] Fix indicator color --- .../controllers/time_series_chart_controller.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/javascript/controllers/time_series_chart_controller.js b/app/javascript/controllers/time_series_chart_controller.js index a952d624..0eacad63 100644 --- a/app/javascript/controllers/time_series_chart_controller.js +++ b/app/javascript/controllers/time_series_chart_controller.js @@ -203,26 +203,29 @@ export default class extends Controller { this.#d3FullChartGroup.selectAll(".guideline").remove() // Big circle - this.#d3FullChartGroup.append("circle") + this.#d3FullChartGroup + .append("circle") .attr("class", "data-point-circle") .attr("cx", this.#d3XScale(d.date)) .attr("cy", this.#d3YScale(d.value)) .attr("r", 8) - .attr("fill", tailwindColors.green[500]) + .attr("fill", this.#trendColor) .attr("fill-opacity", "0.1") .attr("pointer-events", "none") // Small circle - this.#d3FullChartGroup.append("circle") + this.#d3FullChartGroup + .append("circle") .attr("class", "data-point-circle") .attr("cx", this.#d3XScale(d.date)) .attr("cy", this.#d3YScale(d.value)) .attr("r", 3) - .attr("fill", tailwindColors.green[500]) + .attr("fill", this.#trendColor) .attr("pointer-events", "none") // Guideline - this.#d3FullChartGroup.append("line") + this.#d3FullChartGroup + .append("line") .attr("class", "guideline") .attr("x1", this.#d3XScale(d.date)) .attr("y1", 0)