@alauda-fe/common
Version:
Alauda frontend team common codes.
62 lines • 5.76 kB
JavaScript
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { ChartSeriesComponent } from './series.component';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "../../../core/pipes/pure.pipe";
const _c0 = ["aclLineSeries", ""];
function ChartLineSeriesComponent__svg_path_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵnamespaceSVG();
i0.ɵɵelement(0, "path", 2);
i0.ɵɵpipe(1, "pure");
i0.ɵɵpipe(2, "pure");
} if (rf & 2) {
const item_r1 = ctx.$implicit;
const ctx_r1 = i0.ɵɵnextContext();
i0.ɵɵattribute("d", item_r1.path)("stroke", item_r1.color)("visibility", item_r1.visibility)("opacity", i0.ɵɵpipeBind3(1, 5, item_r1.name, ctx_r1.handleOpacity, ctx_r1.activateLegend))("stroke-width", i0.ɵɵpipeBind4(2, 9, item_r1.name, ctx_r1.handleStrokeWidth, ctx_r1.activateLegend, ctx_r1.lineWidth) + "px");
} }
export class ChartLineSeriesComponent extends ChartSeriesComponent {
constructor() {
super(...arguments);
this.seriesType = 'line';
}
static { this.ɵfac = /*@__PURE__*/ (() => { let ɵChartLineSeriesComponent_BaseFactory; return function ChartLineSeriesComponent_Factory(t) { return (ɵChartLineSeriesComponent_BaseFactory || (ɵChartLineSeriesComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ChartLineSeriesComponent)))(t || ChartLineSeriesComponent); }; })(); }
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ChartLineSeriesComponent, selectors: [["g", "aclLineSeries", ""]], inputs: { stepLine: "stepLine", seriesType: "seriesType" }, features: [i0.ɵɵInheritDefinitionFeature], attrs: _c0, decls: 2, vars: 1, consts: [[1, "acl-series"], ["class", "line", "fill", "none", 4, "ngFor", "ngForOf"], ["fill", "none", 1, "line"]], template: function ChartLineSeriesComponent_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵnamespaceSVG();
i0.ɵɵelementStart(0, "g", 0);
i0.ɵɵtemplate(1, ChartLineSeriesComponent__svg_path_1_Template, 3, 14, "path", 1);
i0.ɵɵelementEnd();
} if (rf & 2) {
i0.ɵɵadvance();
i0.ɵɵproperty("ngForOf", ctx.seriesData);
} }, dependencies: [i1.NgForOf, i2.PurePipe], encapsulation: 2, changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ChartLineSeriesComponent, [{
type: Component,
args: [{
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'g[aclLineSeries]',
template: `
<svg:g class="acl-series">
<svg:path
*ngFor="let item of seriesData"
class="line"
[attr.d]="item.path"
[attr.stroke]="item.color"
[attr.visibility]="item.visibility"
[attr.opacity]="item.name | pure: handleOpacity:activateLegend"
[attr.stroke-width]="
(item.name | pure: handleStrokeWidth:activateLegend:lineWidth) + 'px'
"
fill="none"
></svg:path>
</svg:g>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
}]
}], null, { stepLine: [{
type: Input
}], seriesType: [{
type: Input
}] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ChartLineSeriesComponent, { className: "ChartLineSeriesComponent" }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGluZS1zZXJpZXMuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21tb24vc3JjL2NoYXJ0L2NvbW1vbi9zZXJpZXMvbGluZS1zZXJpZXMuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRTFFLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLG9CQUFvQixDQ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