]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: increase the number of plottable graphs in charts 54803/head
authorAashish Sharma <aasharma@li-e74156cc-2f67-11b2-a85c-e98659a63c5c.ibm.com>
Tue, 5 Dec 2023 05:58:25 +0000 (11:28 +0530)
committerAashish Sharma <aasharma@li-e74156cc-2f67-11b2-a85c-e98659a63c5c.ibm.com>
Mon, 15 Jan 2024 08:49:38 +0000 (14:19 +0530)
Fixes: https://tracker.ceph.com/issues/64024
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard-v3/dashboard-area-chart/dashboard-area-chart.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard-v3/dashboard-area-chart/dashboard-area-chart.component.scss
src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard-v3/dashboard-area-chart/dashboard-area-chart.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard-v3/dashboard-area-chart/dashboard-area-chart.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard-v3/dashboard/dashboard-v3.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard-v3/dashboard/dashboard-v3.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-overview-dashboard/rgw-overview-dashboard.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-overview-dashboard/rgw-overview-dashboard.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/prometheus.service.ts
src/pybind/mgr/dashboard/frontend/src/styles/defaults/_bootstrap-defaults.scss

index cebfcf9037810ee7869f8f90fc08bb4fcde06acf..6151843e4e01d743edcf73ad4cc7bb234ee29976 100644 (file)
@@ -3,29 +3,22 @@
     <br>
     <b class="chartTitle pb-2"
        i18n>{{ chartTitle }}</b>
-    <div
+    <div *ngFor="let data of currentChartData.dataset"
          i18n>
-      <div class="d-inline-flex align-items-center gap-1">
-        <div *ngIf="!maxValue"
-             class="blue-box">
-      </div>
-        <div *ngIf="label2">{{ label }}:
+      <div *ngIf="data.data.length !== 0"
+           class="d-inline-flex align-items-center gap-1">
+        <div class="box"
+             [style.background-color]="data.pointBackgroundColor">
         </div>
-        {{ currentData || 'N/A' }} {{ currentDataUnits }}
-        <div *ngIf="maxValue && currentData"> used of
-          {{ maxConvertedValue }} {{ maxConvertedValueUnits }}
+        <div *ngIf="!chartTitle.includes(data.label)">{{ data.label }}:</div>
+          {{ data?.currentData || 'N/A' }} {{ data?.currentDataUnits }}
+        <div *ngIf="maxValue && data.currentData">
+          used of {{ maxConvertedValue }} {{ maxConvertedValueUnits }}
         </div>
       </div>
     </div>
-    <div *ngIf="label2"
-         i18n>
-      <div class="d-inline-flex align-items-center gap-1">
-        <div class="yellow-box"></div>
-        <div *ngIf="label2 !== chartTitle" >{{ label2 }}: </div>
-        <div>{{ currentData2 || 'N/A' }} {{ currentDataUnits2 }}</div>
-      </div>
-    </div>
   </div>
+
   <div class="col-9 d-flex flex-column">
     <div class="chart mt-3">
       <canvas baseChart
index 02310e37e1b3512a653840257591b2bf42b439f4..6b802653230f73598446632cab607d639e8763be 100644 (file)
@@ -4,16 +4,9 @@
   height: 9vh;
 }
 
-.blue-box {
+.box {
   background-color: vv.$chart-color-strong-blue;
   border: 2px double vv.$chart-color-light-gray;
   height: 13px;
   width: 13px;
 }
-
-.yellow-box {
-  background-color: vv.$chart-color-orange;
-  border: 2px double vv.$chart-color-light-gray;
-  height: 13px;
-  width: 13px;
-}
index ec71070544fa3fa6ceeb8673a29eb9dd2d7d87f6..80cdb1ea23692f9b93a497d29ec6a05c3a4e974b 100644 (file)
@@ -28,10 +28,21 @@ describe('DashboardAreaChartComponent', () => {
   beforeEach(() => {
     fixture = TestBed.createComponent(DashboardAreaChartComponent);
     component = fixture.componentInstance;
-    component.data = [
-      [1, '110'],
-      [3, '130']
+    component.dataArray = [
+      [
+        [1, '110'],
+        [3, '130']
+      ],
+      [
+        [2, '120'],
+        [4, '140']
+      ],
+      [
+        [5, '150'],
+        [6, '160']
+      ]
     ];
+    component.labelsArray = ['Read', 'Write', 'Total'];
   });
 
   it('should create', () => {
@@ -43,25 +54,22 @@ describe('DashboardAreaChartComponent', () => {
     expect(chartElement).toBeTruthy();
   });
 
-  it('should have two datasets', () => {
-    component.data2 = [
-      [2, '120'],
-      [4, '140']
-    ];
+  it('should have three datasets', () => {
+    component.ngOnChanges({ dataArray: new SimpleChange(null, component.dataArray, false) });
     expect(component.chartData.dataset[0].data).toBeDefined();
     expect(component.chartData.dataset[1].data).toBeDefined();
+    expect(component.chartData.dataset[2].data).toBeDefined();
   });
 
   it('should set label', () => {
-    component.label = 'Write';
-    expect(component.label).toBe('Write');
+    component.ngOnChanges({ dataArray: new SimpleChange(null, component.dataArray, false) });
+    expect(component.chartData.dataset[0].label).toEqual('Read');
+    expect(component.chartData.dataset[1].label).toEqual('Write');
+    expect(component.chartData.dataset[2].label).toEqual('Total');
   });
 
   it('should transform and update data', () => {
-    expect(component.chartData.dataset[0].data).toEqual([{ x: 0, y: 0 }]);
-
-    component.ngOnChanges({ data: new SimpleChange(null, component.data, false) });
-
+    component.ngOnChanges({ dataArray: new SimpleChange(null, component.dataArray, false) });
     expect(component.chartData.dataset[0].data).toEqual([
       { x: 1000, y: 110 },
       { x: 3000, y: 130 }
@@ -69,8 +77,8 @@ describe('DashboardAreaChartComponent', () => {
   });
 
   it('should set currentData to last value', () => {
-    component.ngOnChanges({ data: new SimpleChange(null, component.data, false) });
-    expect(component.currentData).toBe('130');
+    component.ngOnChanges({ dataArray: new SimpleChange(null, component.dataArray, false) });
+    expect(component.currentChartData.dataset[0].currentData).toBe('130');
   });
 
   it('should keep data units consistency', () => {
@@ -78,12 +86,8 @@ describe('DashboardAreaChartComponent', () => {
     setTimeout(() => {
       fixture.detectChanges();
 
-      component.data = [
-        [1, '1100'],
-        [3, '1300']
-      ];
       component.dataUnits = 'B';
-      component.ngOnChanges({ data: new SimpleChange(null, component.data, false) });
+      component.ngOnChanges({ dataArray: new SimpleChange(null, component.dataArray, false) });
 
       expect(component.currentDataUnits).toBe('KiB');
       expect(component.chartDataUnits).toBe('KiB');
index cbf97691d27dc803a3beb591c316e880da6979a6..4a0d95f5421d125807504075351045614e660b99 100644 (file)
@@ -1,4 +1,4 @@
-import { Component, Input, OnChanges, SimpleChanges, ViewChild } from '@angular/core';
+import { Component, Input, ViewChild, OnChanges, SimpleChanges } from '@angular/core';
 
 import { CssHelper } from '~/app/shared/classes/css-helper';
 import { DimlessBinaryPipe } from '~/app/shared/pipes/dimless-binary.pipe';
@@ -24,26 +24,48 @@ export class DashboardAreaChartComponent implements OnChanges {
   @Input()
   dataUnits: string;
   @Input()
-  data: Array<[number, string]>;
+  dataArray?: Array<Array<[number, string]>>; // Array of query results
   @Input()
-  data2?: Array<[number, string]>;
-  @Input()
-  label: string;
-  @Input()
-  label2?: string;
+  labelsArray?: string[] = []; // Array of chart labels
   @Input()
   decimals?: number = 1;
 
   currentDataUnits: string;
   currentData: number;
-  currentDataUnits2?: string;
-  currentData2?: number;
   maxConvertedValue?: number;
   maxConvertedValueUnits?: string;
 
   chartDataUnits: string;
-  chartData: any;
-  options: any;
+  chartData: any = { dataset: [] };
+  options: any = {};
+  currentChartData: any = {};
+
+  chartColors: any[] = [
+    [
+      this.cssHelper.propertyValue('chart-color-strong-blue'),
+      this.cssHelper.propertyValue('chart-color-translucent-blue')
+    ],
+    [
+      this.cssHelper.propertyValue('chart-color-orange'),
+      this.cssHelper.propertyValue('chart-color-translucent-orange')
+    ],
+    [
+      this.cssHelper.propertyValue('chart-color-green'),
+      this.cssHelper.propertyValue('chart-color-translucent-green')
+    ],
+    [
+      this.cssHelper.propertyValue('chart-color-cyan'),
+      this.cssHelper.propertyValue('chart-color-translucent-cyan')
+    ],
+    [
+      this.cssHelper.propertyValue('chart-color-purple'),
+      this.cssHelper.propertyValue('chart-color-translucent-purple')
+    ],
+    [
+      this.cssHelper.propertyValue('chart-color-red'),
+      this.cssHelper.propertyValue('chart-color-translucent-red')
+    ]
+  ];
 
   public chartAreaBorderPlugin: any[] = [
     {
@@ -74,35 +96,6 @@ export class DashboardAreaChartComponent implements OnChanges {
     private formatter: FormatterService,
     private numberFormatter: NumberFormatterService
   ) {
-    this.chartData = {
-      dataset: [
-        {
-          label: '',
-          data: [{ x: 0, y: 0 }],
-          tension: 0.2,
-          pointBackgroundColor: this.cssHelper.propertyValue('chart-color-strong-blue'),
-          backgroundColor: this.cssHelper.propertyValue('chart-color-translucent-blue'),
-          borderColor: this.cssHelper.propertyValue('chart-color-strong-blue'),
-          borderWidth: 1,
-          fill: {
-            target: 'origin'
-          }
-        },
-        {
-          label: '',
-          data: [],
-          tension: 0.2,
-          pointBackgroundColor: this.cssHelper.propertyValue('chart-color-orange'),
-          backgroundColor: this.cssHelper.propertyValue('chart-color-translucent-yellow'),
-          borderColor: this.cssHelper.propertyValue('chart-color-orange'),
-          borderWidth: 1,
-          fill: {
-            target: 'origin'
-          }
-        }
-      ]
-    };
-
     this.options = {
       plugins: {
         legend: {
@@ -179,27 +172,50 @@ export class DashboardAreaChartComponent implements OnChanges {
     this.updateChartData(changes);
   }
 
+  ngAfterViewInit() {
+    this.updateChartData(null);
+  }
+
   private updateChartData(changes: SimpleChanges): void {
-    this.chartData.dataset[0].label = this.label;
-    this.chartData.dataset[1].label = this.label2;
-    this.setChartTicks();
-    if (changes.data && changes.data.currentValue) {
-      this.data = changes.data.currentValue;
-      this.chartData.dataset[0].data = this.formatData(this.data);
-      [this.currentData, this.currentDataUnits] = this.convertUnits(
-        this.data[this.data.length - 1][1]
-      ).split(' ');
-      [this.maxConvertedValue, this.maxConvertedValueUnits] = this.convertUnits(
-        this.maxValue
-      ).split(' ');
+    for (let index = 0; index < this.labelsArray.length; index++) {
+      const colorIndex = index % this.chartColors.length;
+      this.chartData.dataset[index] = {
+        label: '',
+        data: [],
+        tension: 0.2,
+        pointBackgroundColor: this.chartColors[colorIndex][0],
+        backgroundColor: this.chartColors[colorIndex][1],
+        borderColor: this.chartColors[colorIndex][0],
+        borderWidth: 1,
+        fill: {
+          target: 'origin'
+        }
+      };
+      this.chartData.dataset[index].label = this.labelsArray[index];
     }
-    if (changes.data2 && changes.data2.currentValue) {
-      this.data2 = changes.data2.currentValue;
-      this.chartData.dataset[1].data = this.formatData(this.data2);
-      [this.currentData2, this.currentDataUnits2] = this.convertUnits(
-        this.data2[this.data2.length - 1][1]
-      ).split(' ');
+
+    this.setChartTicks();
+
+    if (this.dataArray) {
+      this.dataArray = changes?.dataArray?.currentValue || this.dataArray;
+      this.currentChartData = this.chartData;
+      for (let index = 0; index < this.dataArray.length; index++) {
+        this.chartData.dataset[index].data = this.formatData(this.dataArray[index]);
+        let currentDataValue = this.dataArray[index][this.dataArray[index].length - 1]
+          ? this.dataArray[index][this.dataArray[index].length - 1][1]
+          : 0;
+        if (currentDataValue) {
+          [
+            this.currentChartData.dataset[index]['currentData'],
+            this.currentChartData.dataset[index]['currentDataUnits']
+          ] = this.convertUnits(currentDataValue).split(' ');
+          [this.maxConvertedValue, this.maxConvertedValueUnits] = this.convertUnits(
+            this.maxValue
+          ).split(' ');
+        }
+      }
     }
+
     if (this.chart) {
       this.chart.chart.update();
     }
@@ -273,16 +289,12 @@ export class DashboardAreaChartComponent implements OnChanges {
     let maxValue = 0;
     let maxValueDataUnits = '';
 
-    if (this.data) {
-      let maxValueData = Math.max(...this.data.map((values: any) => values[1]));
-      if (this.data2) {
-        let maxValueData2 = Math.max(...this.data2.map((values: any) => values[1]));
-        maxValue = Math.max(maxValueData, maxValueData2);
-      } else {
-        maxValue = maxValueData;
-      }
-      [maxValue, maxValueDataUnits] = this.convertUnits(maxValue).split(' ');
-    }
+    const allDataValues = this.dataArray.reduce((array: string[], data) => {
+      return array.concat(data.map((values: [number, string]) => values[1]));
+    }, []);
+
+    maxValue = Math.max(...allDataValues.map(Number));
+    [maxValue, maxValueDataUnits] = this.convertUnits(maxValue).split(' ');
 
     const yAxesTicks = this.chart.chart.options.scales.y;
     yAxesTicks.ticks.callback = (value: any) => {
index 85dc5c96970b71b61cc708306d0ceb637ed8210c..4c290746b45b1cdbdad8e9b5cc0d9cd2d1957f86 100644 (file)
@@ -4,7 +4,7 @@
   <div class="row d-flex flex-row ps-3">
 
     <!-- First Grid to hold Details and Inventory Card-->
-    <div class="col-sm-3 d-flex flex-column ps-2 pe-4">
+    <div class="col-sm-3 d-flex flex-column ps-2">
 
       <!-- Details Card-->
       <cd-card cardTitle="Details"
         </div>
 
       <!-- This column will hold Cluster Utlization card -->
-        <div class="col-sm-12 d-flex flex-column pt-4">
-          <cd-card cardTitle="Cluster Utilization"
-                   i18n-title
-                   aria-label="Cluster utilization card">
-            <div class="ms-4 me-4 mt-0">
-              <cd-dashboard-time-selector (selectedTime)="getPrometheusData($event)">
-              </cd-dashboard-time-selector>
-              <ng-container *ngIf="capacity">
-                <cd-dashboard-area-chart chartTitle="Used Capacity (RAW)"
-                                         [maxValue]="capacity.total_bytes"
-                                         dataUnits="B"
-                                         label="Used Capacity"
-                                         [data]="queriesResults.USEDCAPACITY">
-                </cd-dashboard-area-chart>
-              </ng-container>
-              <cd-dashboard-area-chart chartTitle="IOPS"
-                                       dataUnits=""
-                                       decimals="0"
-                                       label="Reads"
-                                       label2="Writes"
-                                       [data]="queriesResults.READIOPS"
-                                       [data2]="queriesResults.WRITEIOPS">
-              </cd-dashboard-area-chart>
-              <cd-dashboard-area-chart chartTitle="OSD Latencies"
-                                       dataUnits="ms"
-                                       decimals="2"
-                                       label="Apply"
-                                       label2="Commit"
-                                       [data]="queriesResults.READLATENCY"
-                                       [data2]="queriesResults.WRITELATENCY">
-              </cd-dashboard-area-chart>
-              <cd-dashboard-area-chart chartTitle="Client Throughput"
-                                       dataUnits="B/s"
-                                       decimals="2"
-                                       label="Reads"
-                                       label2="Writes"
-                                       [data]="queriesResults.READCLIENTTHROUGHPUT"
-                                       [data2]="queriesResults.WRITECLIENTTHROUGHPUT">
+      <div class="col-sm-12 d-flex flex-column pt-4">
+        <cd-card cardTitle="Cluster Utilization"
+                 i18n-title
+                 aria-label="Cluster utilization card">
+          <div class="ms-4 me-4 mt-0">
+            <cd-dashboard-time-selector (selectedTime)="getPrometheusData($event)">
+            </cd-dashboard-time-selector>
+            <ng-container *ngIf="capacity">
+              <cd-dashboard-area-chart chartTitle="Used Capacity (RAW)"
+                                       [maxValue]="capacity.total_bytes"
+                                       dataUnits="B"
+                                       [labelsArray]="['Used Capacity']"
+                                       [dataArray]="[queriesResults.USEDCAPACITY]">
               </cd-dashboard-area-chart>
-              <cd-dashboard-area-chart chartTitle="Recovery Throughput"
-                                       dataUnits="B/s"
-                                       decimals="2"
-                                       label="Recovery Throughput"
-                                       [data]="queriesResults.RECOVERYBYTES">
-              </cd-dashboard-area-chart>
-            </div>
-          </cd-card>
-        </div>
+            </ng-container>
+            <cd-dashboard-area-chart chartTitle="IOPS"
+                                     dataUnits=""
+                                     decimals="0"
+                                     [labelsArray]="['Reads', 'Writes']"
+                                     [dataArray]="[queriesResults.READIOPS, queriesResults.WRITEIOPS]">
+            </cd-dashboard-area-chart>
+            <cd-dashboard-area-chart chartTitle="OSD Latencies"
+                                     dataUnits="ms"
+                                     decimals="2"
+                                     [labelsArray]="['Apply', 'Commit']"
+                                     [dataArray]="[queriesResults.READLATENCY, queriesResults.WRITELATENCY]">
+            </cd-dashboard-area-chart>
+            <cd-dashboard-area-chart chartTitle="Client Throughput"
+                                     dataUnits="B/s"
+                                     decimals="2"
+                                     [labelsArray]="['Reads', 'Writes']"
+                                     [dataArray]="[queriesResults.READCLIENTTHROUGHPUT, queriesResults.WRITECLIENTTHROUGHPUT]">
+            </cd-dashboard-area-chart>
+            <cd-dashboard-area-chart chartTitle="Recovery Throughput"
+                                     dataUnits="B/s"
+                                     decimals="2"
+                                     [labelsArray]="['Recovery Throughput']"
+                                     [dataArray]="[queriesResults.RECOVERYBYTES]">
+            </cd-dashboard-area-chart>
+          </div>
+        </cd-card>
+      </div>
       </div>
     </div>
   </div>
index 7ec0cd4495be846e7f6be1360840c0bdc869bcca..3c44bd36a8905d7b90db9716d550dc9beaab260f 100644 (file)
@@ -54,15 +54,17 @@ export class DashboardV3Component extends PrometheusListHelper implements OnInit
   healthData: any;
   categoryPgAmount: Record<string, number> = {};
   totalPgs = 0;
-  queriesResults: any = {
-    USEDCAPACITY: '',
-    IPS: '',
-    OPS: '',
-    READLATENCY: '',
-    WRITELATENCY: '',
-    READCLIENTTHROUGHPUT: '',
-    WRITECLIENTTHROUGHPUT: '',
-    RECOVERYBYTES: ''
+  queriesResults: { [key: string]: [] } = {
+    USEDCAPACITY: [],
+    IPS: [],
+    OPS: [],
+    READLATENCY: [],
+    WRITELATENCY: [],
+    READCLIENTTHROUGHPUT: [],
+    WRITECLIENTTHROUGHPUT: [],
+    RECOVERYBYTES: [],
+    READIOPS: [],
+    WRITEIOPS: []
   };
   telemetryEnabled: boolean;
   telemetryURL = 'https://telemetry-public.ceph.com/';
index 0bcc48b4be2d11b651168f6a7919b3034cb42ff0..66f3ec5a5a7ab88a5ceedf61b05c05b45fcf6410 100644 (file)
         </cd-dashboard-time-selector>
         <cd-dashboard-area-chart chartTitle="Requests/sec"
                                  dataUnits=""
-                                 label="Requests/sec"
-                                 [data]="queriesResults.RGW_REQUEST_PER_SECOND">
+                                 [labelsArray]="['Requests/sec']"
+                                 [dataArray]="[queriesResults.RGW_REQUEST_PER_SECOND]">
         </cd-dashboard-area-chart>
         <cd-dashboard-area-chart chartTitle="Latency"
                                  dataUnits="ms"
-                                 label="GET"
-                                 label2="PUT"
-                                 [data]="queriesResults.AVG_GET_LATENCY"
-                                 [data2]="queriesResults.AVG_PUT_LATENCY">
+                                 [labelsArray]="['GET', 'PUT']"
+                                 [dataArray]="[queriesResults.AVG_GET_LATENCY, queriesResults.AVG_PUT_LATENCY]">
         </cd-dashboard-area-chart>
         <cd-dashboard-area-chart chartTitle="Bandwidth"
                                  dataUnits="B"
-                                 label="GET"
-                                 label2="PUT"
-                                 [data]="queriesResults.GET_BANDWIDTH"
-                                 [data2]="queriesResults.PUT_BANDWIDTH">
+                                 [labelsArray]="['GET', 'PUT']"
+                                 [dataArray]="[queriesResults.GET_BANDWIDTH, queriesResults.PUT_BANDWIDTH]">
         </cd-dashboard-area-chart>
       </div>
     </cd-card>
index 00537b32af008660c3796098f2bf0f660ba16bb4..8b5901769c35794e6d0ac1c780424b5243fe42d3 100644 (file)
@@ -46,11 +46,11 @@ export class RgwOverviewDashboardComponent implements OnInit, OnDestroy {
   ZoneSUb: Subscription;
   HealthSub: Subscription;
   BucketSub: Subscription;
-  queriesResults: any = {
-    RGW_REQUEST_PER_SECOND: '',
-    BANDWIDTH: '',
-    AVG_GET_LATENCY: '',
-    AVG_PUT_LATENCY: ''
+  queriesResults: { [key: string]: [] } = {
+    RGW_REQUEST_PER_SECOND: [],
+    BANDWIDTH: [],
+    AVG_GET_LATENCY: [],
+    AVG_PUT_LATENCY: []
   };
   timerGetPrometheusDataSub: Subscription;
   chartTitles = ['Metadata Sync', 'Data Sync'];
index 6917b37662a6f7cc3913c9bfb7b865a1059201cc..e1aa7a07cafc223150ac7951c5ead88e76f6b335 100644 (file)
@@ -154,6 +154,8 @@ export class PrometheusService {
             }).subscribe((data: any) => {
               if (data.result.length) {
                 queriesResults[queryName] = data.result[0].values;
+              } else {
+                queriesResults[queryName] = [];
               }
               if (
                 queriesResults[queryName] !== undefined &&
index d69abf12bc8e8967278ce41cdfaae2e935dd43c9..8147d9381ce6617391590aac44e3e7290f7d3b36 100644 (file)
@@ -15,13 +15,18 @@ $black: #000 !default;
 $blue: #007bff !default;
 $indigo: #6610f2 !default;
 $purple: #6f42c1 !default;
+$purple-dim: #6f42c180 !default;
 $pink: #a94442 !default;
 $red: #dc3545 !default;
+$red-dim: #dc354580 !default;
 $orange: #fd7e14 !default;
+$orange-dim: #fd7e1480 !default;
 $yellow: #d48200 !default;
 $green: #008a00 !default;
+$green-dim: #008a0080 !default;
 $teal: #20c997 !default;
 $cyan: #17a2b8 !default;
+$cyan-dim: #17a2b880 !default;
 $barley-white: #fcecba !default;
 
 $primary: #25828e !default;
@@ -75,17 +80,22 @@ $health-color-warning-800: #9d6d10 !default;
 
 // Chart colors.
 $chart-color-red: $red !default;
-$chart-color-blue: #06c !default;
-$chart-color-orange: #ef9234 !default;
 $chart-color-yellow: #f6d173 !default;
+$chart-color-translucent-red: $red-dim !default;
+$chart-color-blue: $blue !default;
+$chart-color-orange: $orange !default;
+$chart-color-translucent-orange: $orange-dim !default;
+$chart-color-translucent-green: $green-dim !default;
+$chart-color-translucent-cyan: $cyan-dim !default;
+$chart-color-yellow: $yellow !default;
 $chart-color-green: $green !default;
 $chart-color-gray: #ededed !default;
 $chart-color-cyan: $primary-500 !default;
 $chart-color-light-gray: #f0f0f0 !default;
 $chart-color-slight-dark-gray: #d7d7d7 !default;
 $chart-color-dark-gray: #afafaf !default;
-$chart-color-cyan: #73c5c5 !default;
-$chart-color-purple: #3c3d99 !default;
+$chart-color-purple: $purple !default;
+$chart-color-translucent-purple: $purple-dim !default;
 $chart-color-white: #fff !default;
 $chart-color-center-text: #151515 !default;
 $chart-color-center-text-description: #72767b !default;