• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

plotly / angular-plotly.js / 0de81391-b879-4fe6-a7fa-cdecd0fc6db5

pending completion
0de81391-b879-4fe6-a7fa-cdecd0fc6db5

push

circleci

andrefarzat
Creating the PlotlyThemeLoaderService

62 of 73 branches covered (84.93%)

Branch coverage included in aggregate %.

18 of 18 new or added lines in 3 files covered. (100.0%)

208 of 239 relevant lines covered (87.03%)

18.47 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

87.5
/projects/plotly/src/lib/plotly.theme-loader.service.ts
1
import { Injectable } from '@angular/core';
2

3
export type PlotlyTheme = 'ggplot2' | 'seaborn' | 'simple_white' | 'plotly' | 'plotly_white' | 'plotly_dark' | 'presentation' | 'xgridoff' | 'ygridoff' | 'gridon' | 'none';
4

5
@Injectable({
6
    providedIn: 'root'
7
})
8
export class PlotlyThemeLoaderService {
1✔
9

10
    public get isLoading() { return this._isLoading; }
×
11
    private _isLoading: boolean = false;
24✔
12

13
    public load(themeName: PlotlyTheme): Promise<any> {
14
        this._isLoading = true;
11✔
15
        return new Promise(resolve => {
11✔
16
            import(`./themes/${themeName}.json`).then(data => {
11✔
17
                resolve(data);
11✔
18
                this._isLoading = false;
11✔
19
            });
20
        });
21
    }
22
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc