diff --git a/src/app/pages/dashboard/trafficChart/trafficChart.service.ts b/src/app/pages/dashboard/trafficChart/trafficChart.service.ts
index b30e1cf3..8c1aeb5b 100644
--- a/src/app/pages/dashboard/trafficChart/trafficChart.service.ts
+++ b/src/app/pages/dashboard/trafficChart/trafficChart.service.ts
@@ -1,50 +1,56 @@
import {Injectable} from '@angular/core';
-import {layoutColors} from '../../../theme';
+import {BaThemeConfigProvider, colorHelper} from '../../../theme';
@Injectable()
export class TrafficChartService {
- private _palette = layoutColors.bgColorPalette;
- private _data = [
- {
- value: 1000,
- color: this._palette.gossip,
- highlight: this._palette.gossipDark,
- label: 'Ad Campaigns',
- percentage: 17,
- order: 0,
- },{
- value: 1400,
- color: this._palette.white,
- highlight: this._palette.whiteDark,
- label: 'Other',
- percentage: 87,
- order: 1,
- }, {
- value: 1500,
- color: this._palette.blueStone,
- highlight: this._palette.blueStoneDark,
- label: 'Search engines',
- percentage: 22,
- order: 4,
- }, {
- value: 1000,
- color: this._palette.surfieGreen,
- highlight: this._palette.surfieGreenDark,
- label: 'Referral Traffic',
- percentage: 70,
- order: 3,
- }, {
- value: 1200,
- color: this._palette.silverTree,
- highlight: this._palette.silverTreeDark,
- label: 'Direct Traffic',
- percentage: 38,
- order: 2,
- },
- ];
+ constructor(private _baConfig:BaThemeConfigProvider) {
+ }
+
getData() {
- return this._data;
+ let dashboardColors = this._baConfig.get().colors.dashboard;
+ return [
+ {
+ value: 2000,
+ color: dashboardColors.white,
+ highlight: colorHelper.shade(dashboardColors.white, 15),
+ label: 'Other',
+ percentage: 87,
+ order: 1,
+ }, {
+ value: 1500,
+ color: dashboardColors.blueStone,
+ highlight: colorHelper.shade(dashboardColors.blueStone, 15),
+ label: 'Search engines',
+ percentage: 22,
+ order: 4,
+ }, {
+ value: 1000,
+ color: dashboardColors.surfieGreen,
+ highlight: colorHelper.shade(dashboardColors.surfieGreen, 15),
+ label: 'Referral Traffic',
+ percentage: 70,
+ order: 3,
+ }, {
+ value: 1200,
+ color: dashboardColors.silverTree,
+ highlight: colorHelper.shade(dashboardColors.silverTree, 15),
+ label: 'Direct Traffic',
+ percentage: 38,
+ order: 2,
+ }, {
+ value: 400,
+ color: dashboardColors.gossip,
+ highlight: colorHelper.shade(dashboardColors.gossip, 15),
+ label: 'Ad Campaigns',
+ percentage: 17,
+ order: 0,
+ },
+ ];
+ }
+
+ getTransparent() {
+ return this._baConfig.get().theme.blur;
}
}