@progress/kendo-angular-gauges
Version:
Kendo UI Angular Gauges
44 lines (43 loc) • 1.7 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { Injectable } from '@angular/core';
import { gaugeTheme } from '@progress/kendo-charts';
import * as i0 from "@angular/core";
/**
* @hidden
*/
export class ThemeService {
options;
read() {
if (!this.options) {
this.load();
}
return this.options;
}
load() {
if (typeof document === 'undefined') {
this.options = {};
return;
}
const container = document.createElement('div');
container.style.display = 'none';
container.className = 'k-gauge';
document.body.appendChild(container);
try {
this.options = gaugeTheme(container);
}
finally {
document.body.removeChild(container);
}
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ThemeService, providedIn: 'root' });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ThemeService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}] });