How to use the @covalent/echarts/base.getThemes function in @covalent/echarts

To help you get started, we’ve selected a few @covalent/echarts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Teradata / covalent / src / app / utilities / chart-theme.ts View on Github external
import { Injectable } from '@angular/core';
import { Observable, BehaviorSubject } from 'rxjs';

import { getThemes } from '@covalent/echarts/base';

@Injectable({ providedIn: 'root' })
export class ChartThemeSelectorService {
  selected: string = getThemes()[0];

  selectedSubject: BehaviorSubject = new BehaviorSubject(this.selected);

  selected$: Observable = this.selectedSubject.asObservable();

  select(theme: string): void {
    this.selected = theme;
    this.selectedSubject.next(theme);
  }
}

@covalent/echarts

Teradata UI Platform Echarts Module

MIT
Latest version published 11 days ago

Package Health Score

90 / 100
Full package analysis

Popular @covalent/echarts functions