@delon/chart 12.4.1 → 13.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bar/bar.component.d.ts +4 -1
- package/bar/bar.d.ts +1 -0
- package/bar/bar.module.d.ts +8 -0
- package/bar/package.json +5 -6
- package/card/card.component.d.ts +7 -4
- package/card/card.d.ts +1 -0
- package/card/card.module.d.ts +9 -0
- package/card/package.json +5 -6
- package/card/style/index.less +11 -0
- package/{custom/g2Custom.d.ts → chart-echarts/chart-echarts.d.ts} +1 -0
- package/chart-echarts/echarts.component.d.ts +3 -0
- package/chart-echarts/echarts.module.d.ts +7 -0
- package/chart-echarts/echarts.service.d.ts +3 -0
- package/chart-echarts/package.json +6 -7
- package/chart.d.ts +1 -0
- package/{chart-echarts/delon-chart-chart-echarts.d.ts → core/core.d.ts} +1 -0
- package/core/g2.base.component.d.ts +4 -1
- package/core/g2.servicce.d.ts +3 -0
- package/core/package.json +6 -7
- package/custom/custom.component.d.ts +4 -1
- package/{core/delon-chart-core.d.ts → custom/custom.d.ts} +1 -0
- package/custom/custom.module.d.ts +7 -0
- package/custom/package.json +6 -7
- package/esm2020/bar/bar.component.mjs +143 -0
- package/{esm2015/bar/bar.js → esm2020/bar/bar.mjs} +0 -0
- package/esm2020/bar/bar.module.mjs +21 -0
- package/{esm2015/bar/public_api.js → esm2020/bar/public_api.mjs} +0 -0
- package/esm2020/card/card.component.mjs +55 -0
- package/{esm2015/card/card.js → esm2020/card/card.mjs} +0 -0
- package/esm2020/card/card.module.mjs +22 -0
- package/{esm2015/card/public_api.js → esm2020/card/public_api.mjs} +0 -0
- package/esm2020/chart-echarts/chart-echarts.mjs +5 -0
- package/esm2020/chart-echarts/echarts.component.mjs +162 -0
- package/esm2020/chart-echarts/echarts.module.mjs +20 -0
- package/esm2020/chart-echarts/echarts.service.mjs +60 -0
- package/{esm2015/chart-echarts/echarts.types.js → esm2020/chart-echarts/echarts.types.mjs} +0 -0
- package/{esm2015/chart-echarts/public_api.js → esm2020/chart-echarts/public_api.mjs} +0 -0
- package/{esm2015/chart.js → esm2020/chart.mjs} +0 -0
- package/esm2020/core/core.mjs +5 -0
- package/esm2020/core/g2.base.component.mjs +109 -0
- package/esm2020/core/g2.servicce.mjs +54 -0
- package/{esm2015/core/public_api.js → esm2020/core/public_api.mjs} +0 -0
- package/{esm2015/core/types/interaction.js → esm2020/core/types/interaction.mjs} +0 -0
- package/{esm2015/core/types/time.js → esm2020/core/types/time.mjs} +0 -0
- package/esm2020/core/utils.mjs +21 -0
- package/esm2020/custom/custom.component.mjs +70 -0
- package/esm2020/custom/custom.mjs +5 -0
- package/esm2020/custom/custom.module.mjs +20 -0
- package/{esm2015/custom/public_api.js → esm2020/custom/public_api.mjs} +0 -0
- package/esm2020/gauge/gauge.component.mjs +169 -0
- package/{esm2015/gauge/gauge.js → esm2020/gauge/gauge.mjs} +0 -0
- package/esm2020/gauge/gauge.module.mjs +20 -0
- package/{esm2015/gauge/public_api.js → esm2020/gauge/public_api.mjs} +0 -0
- package/esm2020/mini-area/mini-area.component.mjs +133 -0
- package/{esm2015/mini-area/mini-area.js → esm2020/mini-area/mini-area.mjs} +0 -0
- package/esm2020/mini-area/mini-area.module.mjs +19 -0
- package/{esm2015/mini-area/public_api.js → esm2020/mini-area/public_api.mjs} +0 -0
- package/esm2020/mini-bar/mini-bar.component.mjs +100 -0
- package/{esm2015/mini-bar/mini-bar.js → esm2020/mini-bar/mini-bar.mjs} +0 -0
- package/esm2020/mini-bar/mini-bar.module.mjs +19 -0
- package/{esm2015/mini-bar/public_api.js → esm2020/mini-bar/public_api.mjs} +0 -0
- package/esm2020/mini-progress/mini-progress.component.mjs +46 -0
- package/{esm2015/mini-progress/mini-progress.js → esm2020/mini-progress/mini-progress.mjs} +0 -0
- package/esm2020/mini-progress/mini-progress.module.mjs +21 -0
- package/{esm2015/mini-progress/public_api.js → esm2020/mini-progress/public_api.mjs} +0 -0
- package/esm2020/number-info/number-info.component.mjs +45 -0
- package/{esm2015/number-info/number-info.js → esm2020/number-info/number-info.mjs} +0 -0
- package/esm2020/number-info/number-info.module.mjs +21 -0
- package/{esm2015/number-info/public_api.js → esm2020/number-info/public_api.mjs} +0 -0
- package/esm2020/pie/pie.component.mjs +215 -0
- package/{esm2015/pie/pie.js → esm2020/pie/pie.mjs} +0 -0
- package/esm2020/pie/pie.module.mjs +22 -0
- package/{esm2015/pie/public_api.js → esm2020/pie/public_api.mjs} +0 -0
- package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
- package/{esm2015/radar/public_api.js → esm2020/radar/public_api.mjs} +0 -0
- package/esm2020/radar/radar.component.mjs +148 -0
- package/{esm2015/radar/radar.js → esm2020/radar/radar.mjs} +0 -0
- package/esm2020/radar/radar.module.mjs +22 -0
- package/{esm2015/single-bar/public_api.js → esm2020/single-bar/public_api.mjs} +0 -0
- package/esm2020/single-bar/single-bar.component.mjs +126 -0
- package/{esm2015/single-bar/single-bar.js → esm2020/single-bar/single-bar.mjs} +0 -0
- package/esm2020/single-bar/single-bar.module.mjs +19 -0
- package/{esm2015/tag-cloud/public_api.js → esm2020/tag-cloud/public_api.mjs} +0 -0
- package/esm2020/tag-cloud/tag-cloud.component.mjs +161 -0
- package/{esm2015/tag-cloud/tag-cloud.js → esm2020/tag-cloud/tag-cloud.mjs} +0 -0
- package/esm2020/tag-cloud/tag-cloud.module.mjs +20 -0
- package/{esm2015/timeline/public_api.js → esm2020/timeline/public_api.mjs} +0 -0
- package/esm2020/timeline/timeline.component.mjs +204 -0
- package/{esm2015/timeline/timeline.js → esm2020/timeline/timeline.mjs} +0 -0
- package/esm2020/timeline/timeline.module.mjs +21 -0
- package/{esm2015/trend/public_api.js → esm2020/trend/public_api.mjs} +0 -0
- package/esm2020/trend/trend.component.mjs +52 -0
- package/{esm2015/trend/trend.js → esm2020/trend/trend.mjs} +0 -0
- package/esm2020/trend/trend.module.mjs +20 -0
- package/{esm2015/water-wave/public_api.js → esm2020/water-wave/public_api.mjs} +0 -0
- package/esm2020/water-wave/water-wave.component.mjs +221 -0
- package/{esm2015/water-wave/water-wave.js → esm2020/water-wave/water-wave.mjs} +0 -0
- package/esm2020/water-wave/water-wave.module.mjs +20 -0
- package/fesm2015/{bar.js → bar.mjs} +57 -34
- package/fesm2015/bar.mjs.map +1 -0
- package/fesm2015/card.mjs +81 -0
- package/fesm2015/card.mjs.map +1 -0
- package/fesm2015/{delon-chart-chart-echarts.js → chart-echarts.mjs} +62 -53
- package/fesm2015/chart-echarts.mjs.map +1 -0
- package/fesm2015/{chart.js → chart.mjs} +1 -1
- package/fesm2015/chart.mjs.map +1 -0
- package/fesm2015/{delon-chart-core.js → core.mjs} +23 -29
- package/fesm2015/core.mjs.map +1 -0
- package/fesm2015/custom.mjs +94 -0
- package/fesm2015/custom.mjs.map +1 -0
- package/fesm2015/{gauge.js → gauge.mjs} +46 -31
- package/fesm2015/gauge.mjs.map +1 -0
- package/fesm2015/mini-area.mjs +156 -0
- package/fesm2015/mini-area.mjs.map +1 -0
- package/fesm2015/mini-bar.mjs +123 -0
- package/fesm2015/mini-bar.mjs.map +1 -0
- package/fesm2015/mini-progress.mjs +71 -0
- package/fesm2015/mini-progress.mjs.map +1 -0
- package/fesm2015/number-info.mjs +70 -0
- package/fesm2015/number-info.mjs.map +1 -0
- package/fesm2015/pie.mjs +241 -0
- package/fesm2015/pie.mjs.map +1 -0
- package/fesm2015/{radar.js → radar.mjs} +43 -33
- package/fesm2015/radar.mjs.map +1 -0
- package/fesm2015/single-bar.mjs +147 -0
- package/fesm2015/single-bar.mjs.map +1 -0
- package/fesm2015/{tag-cloud.js → tag-cloud.mjs} +39 -26
- package/fesm2015/tag-cloud.mjs.map +1 -0
- package/fesm2015/{timeline.js → timeline.mjs} +64 -36
- package/fesm2015/timeline.mjs.map +1 -0
- package/fesm2015/trend.mjs +76 -0
- package/fesm2015/trend.mjs.map +1 -0
- package/fesm2015/{water-wave.js → water-wave.mjs} +38 -37
- package/fesm2015/water-wave.mjs.map +1 -0
- package/fesm2020/bar.mjs +168 -0
- package/fesm2020/bar.mjs.map +1 -0
- package/fesm2020/card.mjs +81 -0
- package/fesm2020/card.mjs.map +1 -0
- package/fesm2020/chart-echarts.mjs +242 -0
- package/fesm2020/chart-echarts.mjs.map +1 -0
- package/fesm2020/chart.mjs +7 -0
- package/fesm2020/chart.mjs.map +1 -0
- package/fesm2020/core.mjs +187 -0
- package/fesm2020/core.mjs.map +1 -0
- package/fesm2020/custom.mjs +94 -0
- package/fesm2020/custom.mjs.map +1 -0
- package/fesm2020/gauge.mjs +193 -0
- package/fesm2020/gauge.mjs.map +1 -0
- package/fesm2020/mini-area.mjs +156 -0
- package/fesm2020/mini-area.mjs.map +1 -0
- package/fesm2020/mini-bar.mjs +123 -0
- package/fesm2020/mini-bar.mjs.map +1 -0
- package/fesm2020/mini-progress.mjs +71 -0
- package/fesm2020/mini-progress.mjs.map +1 -0
- package/fesm2020/number-info.mjs +70 -0
- package/fesm2020/number-info.mjs.map +1 -0
- package/fesm2020/pie.mjs +241 -0
- package/fesm2020/pie.mjs.map +1 -0
- package/fesm2020/radar.mjs +174 -0
- package/fesm2020/radar.mjs.map +1 -0
- package/fesm2020/single-bar.mjs +149 -0
- package/fesm2020/single-bar.mjs.map +1 -0
- package/fesm2020/tag-cloud.mjs +185 -0
- package/fesm2020/tag-cloud.mjs.map +1 -0
- package/fesm2020/timeline.mjs +229 -0
- package/fesm2020/timeline.mjs.map +1 -0
- package/fesm2020/trend.mjs +76 -0
- package/fesm2020/trend.mjs.map +1 -0
- package/fesm2020/water-wave.mjs +245 -0
- package/fesm2020/water-wave.mjs.map +1 -0
- package/gauge/gauge.component.d.ts +8 -5
- package/gauge/gauge.d.ts +1 -0
- package/gauge/gauge.module.d.ts +7 -0
- package/gauge/package.json +5 -6
- package/mini-area/mini-area.component.d.ts +3 -0
- package/mini-area/mini-area.d.ts +1 -0
- package/mini-area/mini-area.module.d.ts +6 -0
- package/mini-area/package.json +5 -6
- package/mini-bar/mini-bar.component.d.ts +3 -0
- package/mini-bar/mini-bar.d.ts +1 -0
- package/mini-bar/mini-bar.module.d.ts +6 -0
- package/mini-bar/package.json +5 -6
- package/mini-progress/mini-progress.component.d.ts +6 -3
- package/mini-progress/mini-progress.d.ts +1 -0
- package/mini-progress/mini-progress.module.d.ts +8 -0
- package/mini-progress/package.json +5 -6
- package/mini-progress/style/index.less +5 -0
- package/number-info/number-info.component.d.ts +9 -6
- package/number-info/number-info.d.ts +1 -0
- package/number-info/number-info.module.d.ts +8 -0
- package/number-info/package.json +5 -6
- package/number-info/style/index.less +12 -0
- package/package.json +160 -12
- package/pie/package.json +5 -6
- package/pie/pie.component.d.ts +8 -5
- package/pie/pie.d.ts +1 -0
- package/pie/pie.module.d.ts +9 -0
- package/pie/style/index.less +14 -0
- package/radar/package.json +5 -6
- package/radar/radar.component.d.ts +4 -1
- package/radar/radar.d.ts +1 -0
- package/radar/radar.module.d.ts +9 -0
- package/radar/style/index.less +6 -0
- package/single-bar/package.json +5 -6
- package/single-bar/single-bar.component.d.ts +4 -1
- package/single-bar/single-bar.d.ts +1 -0
- package/single-bar/single-bar.module.d.ts +6 -0
- package/tag-cloud/package.json +5 -6
- package/tag-cloud/tag-cloud.component.d.ts +3 -0
- package/tag-cloud/tag-cloud.d.ts +1 -0
- package/tag-cloud/tag-cloud.module.d.ts +7 -0
- package/timeline/package.json +5 -6
- package/timeline/timeline.component.d.ts +5 -2
- package/timeline/timeline.d.ts +1 -0
- package/timeline/timeline.module.d.ts +8 -0
- package/trend/package.json +5 -6
- package/trend/style/index.less +6 -0
- package/trend/trend.component.d.ts +4 -1
- package/trend/trend.d.ts +1 -0
- package/trend/trend.module.d.ts +7 -0
- package/water-wave/package.json +5 -6
- package/water-wave/style/index.less +4 -0
- package/water-wave/water-wave.component.d.ts +5 -2
- package/water-wave/water-wave.d.ts +1 -0
- package/water-wave/water-wave.module.d.ts +7 -0
- package/bar/bar.metadata.json +0 -1
- package/bundles/bar.umd.js +0 -471
- package/bundles/bar.umd.js.map +0 -1
- package/bundles/card.umd.js +0 -408
- package/bundles/card.umd.js.map +0 -1
- package/bundles/chart.umd.js +0 -19
- package/bundles/chart.umd.js.map +0 -1
- package/bundles/delon-chart-chart-echarts.umd.js +0 -617
- package/bundles/delon-chart-chart-echarts.umd.js.map +0 -1
- package/bundles/delon-chart-core.umd.js +0 -550
- package/bundles/delon-chart-core.umd.js.map +0 -1
- package/bundles/g2Custom.umd.js +0 -407
- package/bundles/g2Custom.umd.js.map +0 -1
- package/bundles/gauge.umd.js +0 -511
- package/bundles/gauge.umd.js.map +0 -1
- package/bundles/mini-area.umd.js +0 -471
- package/bundles/mini-area.umd.js.map +0 -1
- package/bundles/mini-bar.umd.js +0 -444
- package/bundles/mini-bar.umd.js.map +0 -1
- package/bundles/mini-progress.umd.js +0 -401
- package/bundles/mini-progress.umd.js.map +0 -1
- package/bundles/number-info.umd.js +0 -392
- package/bundles/number-info.umd.js.map +0 -1
- package/bundles/pie.umd.js +0 -567
- package/bundles/pie.umd.js.map +0 -1
- package/bundles/radar.umd.js +0 -497
- package/bundles/radar.umd.js.map +0 -1
- package/bundles/single-bar.umd.js +0 -464
- package/bundles/single-bar.umd.js.map +0 -1
- package/bundles/tag-cloud.umd.js +0 -495
- package/bundles/tag-cloud.umd.js.map +0 -1
- package/bundles/timeline.umd.js +0 -524
- package/bundles/timeline.umd.js.map +0 -1
- package/bundles/trend.umd.js +0 -391
- package/bundles/trend.umd.js.map +0 -1
- package/bundles/water-wave.umd.js +0 -587
- package/bundles/water-wave.umd.js.map +0 -1
- package/card/card.metadata.json +0 -1
- package/chart-echarts/delon-chart-chart-echarts.metadata.json +0 -1
- package/chart.metadata.json +0 -1
- package/core/delon-chart-core.metadata.json +0 -1
- package/custom/g2Custom.metadata.json +0 -1
- package/esm2015/bar/bar.component.js +0 -124
- package/esm2015/bar/bar.module.js +0 -16
- package/esm2015/card/card.component.js +0 -52
- package/esm2015/card/card.module.js +0 -17
- package/esm2015/chart-echarts/delon-chart-chart-echarts.js +0 -5
- package/esm2015/chart-echarts/echarts.component.js +0 -152
- package/esm2015/chart-echarts/echarts.module.js +0 -15
- package/esm2015/chart-echarts/echarts.service.js +0 -64
- package/esm2015/core/delon-chart-core.js +0 -5
- package/esm2015/core/g2.base.component.js +0 -110
- package/esm2015/core/g2.servicce.js +0 -58
- package/esm2015/core/utils.js +0 -15
- package/esm2015/custom/custom.component.js +0 -58
- package/esm2015/custom/custom.module.js +0 -15
- package/esm2015/custom/g2Custom.js +0 -5
- package/esm2015/gauge/gauge.component.js +0 -158
- package/esm2015/gauge/gauge.module.js +0 -15
- package/esm2015/mini-area/mini-area.component.js +0 -117
- package/esm2015/mini-area/mini-area.module.js +0 -14
- package/esm2015/mini-bar/mini-bar.component.js +0 -90
- package/esm2015/mini-bar/mini-bar.module.js +0 -14
- package/esm2015/mini-progress/mini-progress.component.js +0 -50
- package/esm2015/mini-progress/mini-progress.module.js +0 -16
- package/esm2015/number-info/number-info.component.js +0 -40
- package/esm2015/number-info/number-info.module.js +0 -16
- package/esm2015/pie/pie.component.js +0 -197
- package/esm2015/pie/pie.module.js +0 -17
- package/esm2015/radar/radar.component.js +0 -142
- package/esm2015/radar/radar.module.js +0 -17
- package/esm2015/single-bar/single-bar.component.js +0 -111
- package/esm2015/single-bar/single-bar.module.js +0 -14
- package/esm2015/tag-cloud/tag-cloud.component.js +0 -142
- package/esm2015/tag-cloud/tag-cloud.module.js +0 -15
- package/esm2015/timeline/timeline.component.js +0 -178
- package/esm2015/timeline/timeline.module.js +0 -16
- package/esm2015/trend/trend.component.js +0 -42
- package/esm2015/trend/trend.module.js +0 -15
- package/esm2015/water-wave/water-wave.component.js +0 -224
- package/esm2015/water-wave/water-wave.module.js +0 -15
- package/fesm2015/bar.js.map +0 -1
- package/fesm2015/card.js +0 -74
- package/fesm2015/card.js.map +0 -1
- package/fesm2015/chart.js.map +0 -1
- package/fesm2015/delon-chart-chart-echarts.js.map +0 -1
- package/fesm2015/delon-chart-core.js.map +0 -1
- package/fesm2015/g2Custom.js +0 -78
- package/fesm2015/g2Custom.js.map +0 -1
- package/fesm2015/gauge.js.map +0 -1
- package/fesm2015/mini-area.js +0 -136
- package/fesm2015/mini-area.js.map +0 -1
- package/fesm2015/mini-bar.js +0 -109
- package/fesm2015/mini-bar.js.map +0 -1
- package/fesm2015/mini-progress.js +0 -70
- package/fesm2015/mini-progress.js.map +0 -1
- package/fesm2015/number-info.js +0 -61
- package/fesm2015/number-info.js.map +0 -1
- package/fesm2015/pie.js +0 -219
- package/fesm2015/pie.js.map +0 -1
- package/fesm2015/radar.js.map +0 -1
- package/fesm2015/single-bar.js +0 -130
- package/fesm2015/single-bar.js.map +0 -1
- package/fesm2015/tag-cloud.js.map +0 -1
- package/fesm2015/timeline.js.map +0 -1
- package/fesm2015/trend.js +0 -62
- package/fesm2015/trend.js.map +0 -1
- package/fesm2015/water-wave.js.map +0 -1
- package/gauge/gauge.metadata.json +0 -1
- package/mini-area/mini-area.metadata.json +0 -1
- package/mini-bar/mini-bar.metadata.json +0 -1
- package/mini-progress/mini-progress.metadata.json +0 -1
- package/number-info/number-info.metadata.json +0 -1
- package/pie/pie.metadata.json +0 -1
- package/radar/radar.metadata.json +0 -1
- package/single-bar/single-bar.metadata.json +0 -1
- package/tag-cloud/tag-cloud.metadata.json +0 -1
- package/timeline/timeline.metadata.json +0 -1
- package/trend/trend.metadata.json +0 -1
- package/water-wave/water-wave.metadata.json +0 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, NgModule } from '@angular/core';
|
|
4
|
+
import { InputBoolean } from '@delon/util/decorator';
|
|
5
|
+
import * as i1 from '@angular/common';
|
|
6
|
+
import { CommonModule } from '@angular/common';
|
|
7
|
+
import * as i2 from 'ng-zorro-antd/icon';
|
|
8
|
+
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
9
|
+
|
|
10
|
+
class TrendComponent {
|
|
11
|
+
constructor() {
|
|
12
|
+
/** 是否彩色标记 */
|
|
13
|
+
this.colorful = true;
|
|
14
|
+
/** 颜色反转 */
|
|
15
|
+
this.reverseColor = false;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
TrendComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: TrendComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
19
|
+
TrendComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: TrendComponent, selector: "trend", inputs: { flag: "flag", colorful: "colorful", reverseColor: "reverseColor" }, host: { properties: { "class.trend": "true", "class.trend__grey": "!colorful", "class.trend__reverse": "colorful && reverseColor", "attr.data-flag": "flag" } }, exportAs: ["trend"], ngImport: i0, template: `
|
|
20
|
+
<ng-content></ng-content>
|
|
21
|
+
<span *ngIf="flag" class="trend__{{ flag }}"><i nz-icon nzType="caret-{{ flag }}"></i></span>
|
|
22
|
+
`, isInline: true, directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
23
|
+
__decorate([
|
|
24
|
+
InputBoolean()
|
|
25
|
+
], TrendComponent.prototype, "colorful", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
InputBoolean()
|
|
28
|
+
], TrendComponent.prototype, "reverseColor", void 0);
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: TrendComponent, decorators: [{
|
|
30
|
+
type: Component,
|
|
31
|
+
args: [{
|
|
32
|
+
selector: 'trend',
|
|
33
|
+
exportAs: 'trend',
|
|
34
|
+
template: `
|
|
35
|
+
<ng-content></ng-content>
|
|
36
|
+
<span *ngIf="flag" class="trend__{{ flag }}"><i nz-icon nzType="caret-{{ flag }}"></i></span>
|
|
37
|
+
`,
|
|
38
|
+
host: {
|
|
39
|
+
'[class.trend]': 'true',
|
|
40
|
+
'[class.trend__grey]': '!colorful',
|
|
41
|
+
'[class.trend__reverse]': 'colorful && reverseColor',
|
|
42
|
+
'[attr.data-flag]': `flag`
|
|
43
|
+
},
|
|
44
|
+
preserveWhitespaces: false,
|
|
45
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
46
|
+
encapsulation: ViewEncapsulation.None
|
|
47
|
+
}]
|
|
48
|
+
}], propDecorators: { flag: [{
|
|
49
|
+
type: Input
|
|
50
|
+
}], colorful: [{
|
|
51
|
+
type: Input
|
|
52
|
+
}], reverseColor: [{
|
|
53
|
+
type: Input
|
|
54
|
+
}] } });
|
|
55
|
+
|
|
56
|
+
const COMPONENTS = [TrendComponent];
|
|
57
|
+
class TrendModule {
|
|
58
|
+
}
|
|
59
|
+
TrendModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: TrendModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
60
|
+
TrendModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: TrendModule, declarations: [TrendComponent], imports: [CommonModule, NzIconModule], exports: [TrendComponent] });
|
|
61
|
+
TrendModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: TrendModule, imports: [[CommonModule, NzIconModule]] });
|
|
62
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: TrendModule, decorators: [{
|
|
63
|
+
type: NgModule,
|
|
64
|
+
args: [{
|
|
65
|
+
imports: [CommonModule, NzIconModule],
|
|
66
|
+
declarations: COMPONENTS,
|
|
67
|
+
exports: COMPONENTS
|
|
68
|
+
}]
|
|
69
|
+
}] });
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Generated bundle index. Do not edit.
|
|
73
|
+
*/
|
|
74
|
+
|
|
75
|
+
export { TrendComponent, TrendModule };
|
|
76
|
+
//# sourceMappingURL=trend.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trend.mjs","sources":["../../../../packages/chart/trend/trend.component.ts","../../../../packages/chart/trend/trend.module.ts","../../../../packages/chart/trend/trend.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\n\nimport { BooleanInput, InputBoolean } from '@delon/util/decorator';\n\n@Component({\n selector: 'trend',\n exportAs: 'trend',\n template: `\n <ng-content></ng-content>\n <span *ngIf=\"flag\" class=\"trend__{{ flag }}\"><i nz-icon nzType=\"caret-{{ flag }}\"></i></span>\n `,\n host: {\n '[class.trend]': 'true',\n '[class.trend__grey]': '!colorful',\n '[class.trend__reverse]': 'colorful && reverseColor',\n '[attr.data-flag]': `flag`\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class TrendComponent {\n static ngAcceptInputType_colorful: BooleanInput;\n static ngAcceptInputType_reverseColor: BooleanInput;\n\n /** 上升下降标识 */\n @Input() flag?: 'up' | 'down';\n /** 是否彩色标记 */\n @Input() @InputBoolean() colorful = true;\n /** 颜色反转 */\n @Input() @InputBoolean() reverseColor = false;\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzIconModule } from 'ng-zorro-antd/icon';\n\nimport { TrendComponent } from './trend.component';\n\nconst COMPONENTS = [TrendComponent];\n\n@NgModule({\n imports: [CommonModule, NzIconModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class TrendModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;MAqBa,cAAc;IAjB3B;;QAwB2B,aAAQ,GAAG,IAAI,CAAC;;QAEhB,iBAAY,GAAG,KAAK,CAAC;KAC/C;;2GAVY,cAAc;+FAAd,cAAc,iTAdf;;;GAGT;AAkBwB;IAAf,YAAY,EAAE;gDAAiB;AAEhB;IAAf,YAAY,EAAE;oDAAsB;2FATnC,cAAc;kBAjB1B,SAAS;mBAAC;oBACT,QAAQ,EAAE,OAAO;oBACjB,QAAQ,EAAE,OAAO;oBACjB,QAAQ,EAAE;;;GAGT;oBACD,IAAI,EAAE;wBACJ,eAAe,EAAE,MAAM;wBACvB,qBAAqB,EAAE,WAAW;wBAClC,wBAAwB,EAAE,0BAA0B;wBACpD,kBAAkB,EAAE,MAAM;qBAC3B;oBACD,mBAAmB,EAAE,KAAK;oBAC1B,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;iBACtC;8BAMU,IAAI;sBAAZ,KAAK;gBAEmB,QAAQ;sBAAhC,KAAK;gBAEmB,YAAY;sBAApC,KAAK;;;ACvBR,MAAM,UAAU,GAAG,CAAC,cAAc,CAAC,CAAC;MAOvB,WAAW;;wGAAX,WAAW;yGAAX,WAAW,iBAPJ,cAAc,aAGtB,YAAY,EAAE,YAAY,aAHlB,cAAc;yGAOrB,WAAW,YAJb,CAAC,YAAY,EAAE,YAAY,CAAC;2FAI1B,WAAW;kBALvB,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;oBACrC,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACbD;;;;;;"}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { Component, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, Input, NgModule } from '@angular/core';
|
|
4
|
+
import { fromEvent } from 'rxjs';
|
|
5
|
+
import { debounceTime } from 'rxjs/operators';
|
|
6
|
+
import { InputBoolean, InputNumber } from '@delon/util/decorator';
|
|
7
|
+
import * as i1 from '@angular/cdk/platform';
|
|
8
|
+
import * as i2 from '@angular/common';
|
|
9
|
+
import { CommonModule } from '@angular/common';
|
|
10
|
+
import * as i3 from 'ng-zorro-antd/core/outlet';
|
|
11
|
+
import { NzOutletModule } from 'ng-zorro-antd/core/outlet';
|
|
12
|
+
|
|
13
|
+
class G2WaterWaveComponent {
|
|
14
|
+
// #endregion
|
|
15
|
+
constructor(el, renderer, ngZone, cdr, platform) {
|
|
16
|
+
this.el = el;
|
|
17
|
+
this.renderer = renderer;
|
|
18
|
+
this.ngZone = ngZone;
|
|
19
|
+
this.cdr = cdr;
|
|
20
|
+
this.platform = platform;
|
|
21
|
+
this.resize$ = null;
|
|
22
|
+
// #region fields
|
|
23
|
+
this.animate = true;
|
|
24
|
+
this.delay = 0;
|
|
25
|
+
this.color = '#1890FF';
|
|
26
|
+
this.height = 160;
|
|
27
|
+
}
|
|
28
|
+
renderChart(isUpdate) {
|
|
29
|
+
if (!this.resize$)
|
|
30
|
+
return;
|
|
31
|
+
this.updateRadio();
|
|
32
|
+
const { percent, color, node, animate } = this;
|
|
33
|
+
const data = Math.min(Math.max(percent / 100, 0), 100);
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
35
|
+
const self = this;
|
|
36
|
+
cancelAnimationFrame(this.timer);
|
|
37
|
+
const canvas = node.nativeElement;
|
|
38
|
+
const ctx = canvas.getContext('2d');
|
|
39
|
+
const canvasWidth = canvas.width;
|
|
40
|
+
const canvasHeight = canvas.height;
|
|
41
|
+
const radius = canvasWidth / 2;
|
|
42
|
+
const lineWidth = 2;
|
|
43
|
+
const cR = radius - lineWidth;
|
|
44
|
+
ctx.beginPath();
|
|
45
|
+
ctx.lineWidth = lineWidth * 2;
|
|
46
|
+
const axisLength = canvasWidth - lineWidth;
|
|
47
|
+
const unit = axisLength / 8;
|
|
48
|
+
const xOffset = lineWidth;
|
|
49
|
+
let sp = 0; // 周期偏移量
|
|
50
|
+
const range = 0.2; // 振幅
|
|
51
|
+
let currRange = range;
|
|
52
|
+
let currData = 0;
|
|
53
|
+
const waveupsp = animate ? 0.005 : 0.015; // 水波上涨速度
|
|
54
|
+
let arcStack = [];
|
|
55
|
+
const bR = radius - lineWidth;
|
|
56
|
+
const circleOffset = -(Math.PI / 2);
|
|
57
|
+
let circleLock = true;
|
|
58
|
+
for (let i = circleOffset; i < circleOffset + 2 * Math.PI; i += 1 / (8 * Math.PI)) {
|
|
59
|
+
arcStack.push([radius + bR * Math.cos(i), radius + bR * Math.sin(i)]);
|
|
60
|
+
}
|
|
61
|
+
const cStartPoint = arcStack.shift();
|
|
62
|
+
ctx.strokeStyle = color;
|
|
63
|
+
ctx.moveTo(cStartPoint[0], cStartPoint[1]);
|
|
64
|
+
function drawSin() {
|
|
65
|
+
ctx.beginPath();
|
|
66
|
+
ctx.save();
|
|
67
|
+
const sinStack = [];
|
|
68
|
+
for (let i = xOffset; i <= xOffset + axisLength; i += 20 / axisLength) {
|
|
69
|
+
const x = sp + (xOffset + i) / unit;
|
|
70
|
+
const y = Math.sin(x) * currRange;
|
|
71
|
+
const dx = i;
|
|
72
|
+
const dy = 2 * cR * (1 - currData) + (radius - cR) - unit * y;
|
|
73
|
+
ctx.lineTo(dx, dy);
|
|
74
|
+
sinStack.push([dx, dy]);
|
|
75
|
+
}
|
|
76
|
+
const startPoint = sinStack.shift();
|
|
77
|
+
ctx.lineTo(xOffset + axisLength, canvasHeight);
|
|
78
|
+
ctx.lineTo(xOffset, canvasHeight);
|
|
79
|
+
ctx.lineTo(startPoint[0], startPoint[1]);
|
|
80
|
+
const gradient = ctx.createLinearGradient(0, 0, 0, canvasHeight);
|
|
81
|
+
gradient.addColorStop(0, '#ffffff');
|
|
82
|
+
gradient.addColorStop(1, color);
|
|
83
|
+
ctx.fillStyle = gradient;
|
|
84
|
+
ctx.fill();
|
|
85
|
+
ctx.restore();
|
|
86
|
+
}
|
|
87
|
+
function render() {
|
|
88
|
+
ctx.clearRect(0, 0, canvasWidth, canvasHeight);
|
|
89
|
+
if (circleLock && !isUpdate) {
|
|
90
|
+
if (arcStack.length) {
|
|
91
|
+
if (animate) {
|
|
92
|
+
const temp = arcStack.shift();
|
|
93
|
+
ctx.lineTo(temp[0], temp[1]);
|
|
94
|
+
ctx.stroke();
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
for (const temp of arcStack) {
|
|
98
|
+
ctx.lineTo(temp[0], temp[1]);
|
|
99
|
+
ctx.stroke();
|
|
100
|
+
}
|
|
101
|
+
arcStack = [];
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
circleLock = false;
|
|
106
|
+
ctx.lineTo(cStartPoint[0], cStartPoint[1]);
|
|
107
|
+
ctx.stroke();
|
|
108
|
+
arcStack = null;
|
|
109
|
+
ctx.globalCompositeOperation = 'destination-over';
|
|
110
|
+
ctx.beginPath();
|
|
111
|
+
ctx.lineWidth = lineWidth;
|
|
112
|
+
ctx.arc(radius, radius, bR, 0, 2 * Math.PI, true);
|
|
113
|
+
ctx.beginPath();
|
|
114
|
+
ctx.save();
|
|
115
|
+
ctx.arc(radius, radius, radius - 3 * lineWidth, 0, 2 * Math.PI, true);
|
|
116
|
+
ctx.restore();
|
|
117
|
+
ctx.clip();
|
|
118
|
+
ctx.fillStyle = color;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
if (data >= 0.85) {
|
|
123
|
+
if (currRange > range / 4) {
|
|
124
|
+
const t = range * 0.01;
|
|
125
|
+
currRange -= t;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
else if (data <= 0.1) {
|
|
129
|
+
if (currRange < range * 1.5) {
|
|
130
|
+
const t = range * 0.01;
|
|
131
|
+
currRange += t;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
if (currRange <= range) {
|
|
136
|
+
const t = range * 0.01;
|
|
137
|
+
currRange += t;
|
|
138
|
+
}
|
|
139
|
+
if (currRange >= range) {
|
|
140
|
+
const t = range * 0.01;
|
|
141
|
+
currRange -= t;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
if (data - currData > 0) {
|
|
145
|
+
currData += waveupsp;
|
|
146
|
+
}
|
|
147
|
+
if (data - currData < 0) {
|
|
148
|
+
currData -= waveupsp;
|
|
149
|
+
}
|
|
150
|
+
sp += 0.07;
|
|
151
|
+
drawSin();
|
|
152
|
+
}
|
|
153
|
+
self.timer = requestAnimationFrame(render);
|
|
154
|
+
}
|
|
155
|
+
render();
|
|
156
|
+
// drawSin();
|
|
157
|
+
}
|
|
158
|
+
updateRadio() {
|
|
159
|
+
const { offsetWidth } = this.el.nativeElement.parentNode;
|
|
160
|
+
const radio = offsetWidth < this.height ? offsetWidth / this.height : 1;
|
|
161
|
+
this.renderer.setStyle(this.el.nativeElement, 'transform', `scale(${radio})`);
|
|
162
|
+
}
|
|
163
|
+
render() {
|
|
164
|
+
this.renderChart(false);
|
|
165
|
+
}
|
|
166
|
+
installResizeEvent() {
|
|
167
|
+
this.resize$ = fromEvent(window, 'resize')
|
|
168
|
+
.pipe(debounceTime(200))
|
|
169
|
+
.subscribe(() => this.updateRadio());
|
|
170
|
+
}
|
|
171
|
+
ngOnInit() {
|
|
172
|
+
if (!this.platform.isBrowser) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
this.installResizeEvent();
|
|
176
|
+
this.ngZone.runOutsideAngular(() => setTimeout(() => this.render(), this.delay));
|
|
177
|
+
}
|
|
178
|
+
ngOnChanges() {
|
|
179
|
+
this.ngZone.runOutsideAngular(() => this.renderChart(true));
|
|
180
|
+
this.cdr.detectChanges();
|
|
181
|
+
}
|
|
182
|
+
ngOnDestroy() {
|
|
183
|
+
if (this.timer) {
|
|
184
|
+
cancelAnimationFrame(this.timer);
|
|
185
|
+
}
|
|
186
|
+
if (this.resize$) {
|
|
187
|
+
this.resize$.unsubscribe();
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
G2WaterWaveComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2WaterWaveComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i1.Platform }], target: i0.ɵɵFactoryTarget.Component });
|
|
192
|
+
G2WaterWaveComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: G2WaterWaveComponent, selector: "g2-water-wave", inputs: { animate: "animate", delay: "delay", title: "title", color: "color", height: "height", percent: "percent" }, host: { properties: { "class.g2-water-wave": "true" } }, viewQueries: [{ propertyName: "node", first: true, predicate: ["container"], descendants: true, static: true }], exportAs: ["g2WaterWave"], usesOnChanges: true, ngImport: i0, template: "<div [ngStyle]=\"{ 'height.px': height, 'width.px': height, overflow: 'hidden' }\">\n <canvas #container class=\"g2-water-wave__canvas\" width=\"{{ height * 2 }}\" height=\"{{ height * 2 }}\"></canvas>\n</div>\n<div class=\"g2-water-wave__desc\" [ngStyle]=\"{ 'width.px': height }\">\n <span *ngIf=\"title\" class=\"g2-water-wave__desc-title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n </span>\n <h4 class=\"g2-water-wave__desc-percent\">{{ percent }}%</h4>\n</div>\n", directives: [{ type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
193
|
+
__decorate([
|
|
194
|
+
InputBoolean()
|
|
195
|
+
], G2WaterWaveComponent.prototype, "animate", void 0);
|
|
196
|
+
__decorate([
|
|
197
|
+
InputNumber()
|
|
198
|
+
], G2WaterWaveComponent.prototype, "delay", void 0);
|
|
199
|
+
__decorate([
|
|
200
|
+
InputNumber()
|
|
201
|
+
], G2WaterWaveComponent.prototype, "height", void 0);
|
|
202
|
+
__decorate([
|
|
203
|
+
InputNumber()
|
|
204
|
+
], G2WaterWaveComponent.prototype, "percent", void 0);
|
|
205
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2WaterWaveComponent, decorators: [{
|
|
206
|
+
type: Component,
|
|
207
|
+
args: [{ selector: 'g2-water-wave', exportAs: 'g2WaterWave', host: { '[class.g2-water-wave]': 'true' }, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div [ngStyle]=\"{ 'height.px': height, 'width.px': height, overflow: 'hidden' }\">\n <canvas #container class=\"g2-water-wave__canvas\" width=\"{{ height * 2 }}\" height=\"{{ height * 2 }}\"></canvas>\n</div>\n<div class=\"g2-water-wave__desc\" [ngStyle]=\"{ 'width.px': height }\">\n <span *ngIf=\"title\" class=\"g2-water-wave__desc-title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n </span>\n <h4 class=\"g2-water-wave__desc-percent\">{{ percent }}%</h4>\n</div>\n" }]
|
|
208
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i1.Platform }]; }, propDecorators: { node: [{
|
|
209
|
+
type: ViewChild,
|
|
210
|
+
args: ['container', { static: true }]
|
|
211
|
+
}], animate: [{
|
|
212
|
+
type: Input
|
|
213
|
+
}], delay: [{
|
|
214
|
+
type: Input
|
|
215
|
+
}], title: [{
|
|
216
|
+
type: Input
|
|
217
|
+
}], color: [{
|
|
218
|
+
type: Input
|
|
219
|
+
}], height: [{
|
|
220
|
+
type: Input
|
|
221
|
+
}], percent: [{
|
|
222
|
+
type: Input
|
|
223
|
+
}] } });
|
|
224
|
+
|
|
225
|
+
const COMPONENTS = [G2WaterWaveComponent];
|
|
226
|
+
class G2WaterWaveModule {
|
|
227
|
+
}
|
|
228
|
+
G2WaterWaveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2WaterWaveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
229
|
+
G2WaterWaveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2WaterWaveModule, declarations: [G2WaterWaveComponent], imports: [CommonModule, NzOutletModule], exports: [G2WaterWaveComponent] });
|
|
230
|
+
G2WaterWaveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2WaterWaveModule, imports: [[CommonModule, NzOutletModule]] });
|
|
231
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2WaterWaveModule, decorators: [{
|
|
232
|
+
type: NgModule,
|
|
233
|
+
args: [{
|
|
234
|
+
imports: [CommonModule, NzOutletModule],
|
|
235
|
+
declarations: COMPONENTS,
|
|
236
|
+
exports: COMPONENTS
|
|
237
|
+
}]
|
|
238
|
+
}] });
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Generated bundle index. Do not edit.
|
|
242
|
+
*/
|
|
243
|
+
|
|
244
|
+
export { G2WaterWaveComponent, G2WaterWaveModule };
|
|
245
|
+
//# sourceMappingURL=water-wave.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"water-wave.mjs","sources":["../../../../packages/chart/water-wave/water-wave.component.ts","../../../../packages/chart/water-wave/water-wave.component.html","../../../../packages/chart/water-wave/water-wave.module.ts","../../../../packages/chart/water-wave/water-wave.ts"],"sourcesContent":["import { Platform } from '@angular/cdk/platform';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Renderer2,\n TemplateRef,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { fromEvent, Subscription } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\n\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput } from '@delon/util/decorator';\n\n@Component({\n selector: 'g2-water-wave',\n exportAs: 'g2WaterWave',\n templateUrl: './water-wave.component.html',\n host: { '[class.g2-water-wave]': 'true' },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class G2WaterWaveComponent implements OnDestroy, OnChanges, OnInit {\n static ngAcceptInputType_animate: BooleanInput;\n static ngAcceptInputType_delay: NumberInput;\n static ngAcceptInputType_height: NumberInput;\n static ngAcceptInputType_percent: NumberInput;\n\n private resize$: Subscription | null = null;\n @ViewChild('container', { static: true }) private node!: ElementRef;\n private timer!: number;\n\n // #region fields\n\n @Input() @InputBoolean() animate = true;\n @Input() @InputNumber() delay = 0;\n @Input() title?: string | TemplateRef<void> | null;\n @Input() color = '#1890FF';\n @Input() @InputNumber() height = 160;\n @Input() @InputNumber() percent?: number;\n\n // #endregion\n\n constructor(\n private el: ElementRef,\n private renderer: Renderer2,\n private ngZone: NgZone,\n private cdr: ChangeDetectorRef,\n private platform: Platform\n ) {}\n\n private renderChart(isUpdate: boolean): void {\n if (!this.resize$) return;\n\n this.updateRadio();\n\n const { percent, color, node, animate } = this;\n\n const data = Math.min(Math.max(percent! / 100, 0), 100);\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const self = this;\n cancelAnimationFrame(this.timer);\n\n const canvas = node.nativeElement as HTMLCanvasElement;\n const ctx = canvas.getContext('2d') as CanvasRenderingContext2D;\n const canvasWidth = canvas.width;\n const canvasHeight = canvas.height;\n const radius = canvasWidth / 2;\n const lineWidth = 2;\n const cR = radius - lineWidth;\n\n ctx.beginPath();\n ctx.lineWidth = lineWidth * 2;\n\n const axisLength = canvasWidth - lineWidth;\n const unit = axisLength / 8;\n const xOffset = lineWidth;\n let sp = 0; // 周期偏移量\n const range = 0.2; // 振幅\n let currRange = range;\n let currData = 0;\n const waveupsp = animate ? 0.005 : 0.015; // 水波上涨速度\n\n let arcStack: [[number, number]?] | null = [];\n const bR = radius - lineWidth;\n const circleOffset = -(Math.PI / 2);\n let circleLock = true;\n\n for (let i = circleOffset; i < circleOffset + 2 * Math.PI; i += 1 / (8 * Math.PI)) {\n arcStack.push([radius + bR * Math.cos(i), radius + bR * Math.sin(i)]);\n }\n\n const cStartPoint = arcStack.shift() as [number, number];\n ctx.strokeStyle = color;\n ctx.moveTo(cStartPoint[0], cStartPoint[1]);\n\n function drawSin(): void {\n ctx.beginPath();\n ctx.save();\n\n const sinStack: [[number, number]?] = [];\n for (let i = xOffset; i <= xOffset + axisLength; i += 20 / axisLength) {\n const x = sp + (xOffset + i) / unit;\n const y = Math.sin(x) * currRange;\n const dx = i;\n const dy = 2 * cR * (1 - currData) + (radius - cR) - unit * y;\n\n ctx.lineTo(dx, dy);\n sinStack.push([dx, dy]);\n }\n\n const startPoint = sinStack.shift() as [number, number];\n\n ctx.lineTo(xOffset + axisLength, canvasHeight);\n ctx.lineTo(xOffset, canvasHeight);\n ctx.lineTo(startPoint[0], startPoint[1]);\n\n const gradient = ctx.createLinearGradient(0, 0, 0, canvasHeight);\n gradient.addColorStop(0, '#ffffff');\n gradient.addColorStop(1, color);\n ctx.fillStyle = gradient;\n ctx.fill();\n ctx.restore();\n }\n\n function render(): void {\n ctx.clearRect(0, 0, canvasWidth, canvasHeight);\n if (circleLock && !isUpdate) {\n if (arcStack!.length) {\n if (animate) {\n const temp = arcStack!.shift() as [number, number];\n ctx.lineTo(temp[0], temp[1]);\n ctx.stroke();\n } else {\n for (const temp of arcStack!) {\n ctx.lineTo(temp![0], temp![1]);\n ctx.stroke();\n }\n arcStack = [];\n }\n } else {\n circleLock = false;\n ctx.lineTo(cStartPoint[0], cStartPoint[1]);\n ctx.stroke();\n arcStack = null;\n\n ctx.globalCompositeOperation = 'destination-over';\n ctx.beginPath();\n ctx.lineWidth = lineWidth;\n ctx.arc(radius, radius, bR, 0, 2 * Math.PI, true);\n\n ctx.beginPath();\n ctx.save();\n ctx.arc(radius, radius, radius - 3 * lineWidth, 0, 2 * Math.PI, true);\n\n ctx.restore();\n ctx.clip();\n ctx.fillStyle = color;\n }\n } else {\n if (data >= 0.85) {\n if (currRange > range / 4) {\n const t = range * 0.01;\n currRange -= t;\n }\n } else if (data <= 0.1) {\n if (currRange < range * 1.5) {\n const t = range * 0.01;\n currRange += t;\n }\n } else {\n if (currRange <= range) {\n const t = range * 0.01;\n currRange += t;\n }\n if (currRange >= range) {\n const t = range * 0.01;\n currRange -= t;\n }\n }\n if (data - currData > 0) {\n currData += waveupsp;\n }\n if (data - currData < 0) {\n currData -= waveupsp;\n }\n\n sp += 0.07;\n drawSin();\n }\n self.timer = requestAnimationFrame(render);\n }\n\n render();\n // drawSin();\n }\n\n private updateRadio(): void {\n const { offsetWidth } = this.el.nativeElement.parentNode;\n const radio = offsetWidth < this.height ? offsetWidth / this.height : 1;\n this.renderer.setStyle(this.el.nativeElement, 'transform', `scale(${radio})`);\n }\n\n render(): void {\n this.renderChart(false);\n }\n\n private installResizeEvent(): void {\n this.resize$ = fromEvent(window, 'resize')\n .pipe(debounceTime(200))\n .subscribe(() => this.updateRadio());\n }\n\n ngOnInit(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n this.installResizeEvent();\n this.ngZone.runOutsideAngular(() => setTimeout(() => this.render(), this.delay));\n }\n\n ngOnChanges(): void {\n this.ngZone.runOutsideAngular(() => this.renderChart(true));\n this.cdr.detectChanges();\n }\n\n ngOnDestroy(): void {\n if (this.timer) {\n cancelAnimationFrame(this.timer);\n }\n if (this.resize$) {\n this.resize$.unsubscribe();\n }\n }\n}\n","<div [ngStyle]=\"{ 'height.px': height, 'width.px': height, overflow: 'hidden' }\">\n <canvas #container class=\"g2-water-wave__canvas\" width=\"{{ height * 2 }}\" height=\"{{ height * 2 }}\"></canvas>\n</div>\n<div class=\"g2-water-wave__desc\" [ngStyle]=\"{ 'width.px': height }\">\n <span *ngIf=\"title\" class=\"g2-water-wave__desc-title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n </span>\n <h4 class=\"g2-water-wave__desc-percent\">{{ percent }}%</h4>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzOutletModule } from 'ng-zorro-antd/core/outlet';\n\nimport { G2WaterWaveComponent } from './water-wave.component';\n\nconst COMPONENTS = [G2WaterWaveComponent];\n\n@NgModule({\n imports: [CommonModule, NzOutletModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class G2WaterWaveModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;MA8Ba,oBAAoB;;IAqB/B,YACU,EAAc,EACd,QAAmB,EACnB,MAAc,EACd,GAAsB,EACtB,QAAkB;QAJlB,OAAE,GAAF,EAAE,CAAY;QACd,aAAQ,GAAR,QAAQ,CAAW;QACnB,WAAM,GAAN,MAAM,CAAQ;QACd,QAAG,GAAH,GAAG,CAAmB;QACtB,aAAQ,GAAR,QAAQ,CAAU;QApBpB,YAAO,GAAwB,IAAI,CAAC;;QAMnB,YAAO,GAAG,IAAI,CAAC;QAChB,UAAK,GAAG,CAAC,CAAC;QAEzB,UAAK,GAAG,SAAS,CAAC;QACH,WAAM,GAAG,GAAG,CAAC;KAWjC;IAEI,WAAW,CAAC,QAAiB;QACnC,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,OAAO;QAE1B,IAAI,CAAC,WAAW,EAAE,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7B,KAAK;gBACkB,OAAO;sBAA9B,KAAK;;;AExCR,MAAM,UAAU,GAAG,CAAC,oBAAoB,CAAC,CAAC;MAO7B,iBAAiB;;8GAAjB,iBAAiB;+GAAjB,iBAAiB,iBAPV,oBAAoB,aAG5B,YAAY,EAAE,cAAc,aAHpB,oBAAoB;+GAO3B,iBAAiB,YAJnB,CAAC,YAAY,EAAE,cAAc,CAAC;2FAI5B,iBAAiB;kBAL7B,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,CAAC;oBACvC,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACbD;;;;;;"}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { G2BaseComponent } from '@delon/chart/core';
|
|
2
2
|
import { NumberInput } from '@delon/util/decorator';
|
|
3
3
|
import type { NzSafeAny } from 'ng-zorro-antd/core/types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class G2GaugeComponent extends G2BaseComponent {
|
|
5
6
|
static ngAcceptInputType_height: NumberInput;
|
|
6
7
|
static ngAcceptInputType_percent: NumberInput;
|
|
7
|
-
title
|
|
8
|
-
height
|
|
8
|
+
title?: string;
|
|
9
|
+
height?: number;
|
|
9
10
|
color: string;
|
|
10
|
-
bgColor
|
|
11
|
-
format
|
|
12
|
-
percent
|
|
11
|
+
bgColor?: string;
|
|
12
|
+
format?: (text: string, item: NzSafeAny, index: number) => string;
|
|
13
|
+
percent?: number;
|
|
13
14
|
padding: number | number[] | 'auto';
|
|
14
15
|
install(): void;
|
|
15
16
|
changeData(): void;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<G2GaugeComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<G2GaugeComponent, "g2-gauge", ["g2Gauge"], { "title": "title"; "height": "height"; "color": "color"; "bgColor": "bgColor"; "format": "format"; "percent": "percent"; "padding": "padding"; }, {}, never, never>;
|
|
16
19
|
}
|
package/gauge/gauge.d.ts
CHANGED
package/gauge/gauge.module.d.ts
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./gauge.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "ng-zorro-antd/skeleton";
|
|
1
5
|
export declare class G2GaugeModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<G2GaugeModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<G2GaugeModule, [typeof i1.G2GaugeComponent], [typeof i2.CommonModule, typeof i3.NzSkeletonModule], [typeof i1.G2GaugeComponent]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<G2GaugeModule>;
|
|
2
9
|
}
|
package/gauge/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"fesm2015": "../fesm2015/gauge.
|
|
2
|
+
"module": "../fesm2015/gauge.mjs",
|
|
3
|
+
"es2020": "../fesm2020/gauge.mjs",
|
|
4
|
+
"esm2020": "../esm2020/gauge/gauge.mjs",
|
|
5
|
+
"fesm2020": "../fesm2020/gauge.mjs",
|
|
6
|
+
"fesm2015": "../fesm2015/gauge.mjs",
|
|
7
7
|
"typings": "gauge.d.ts",
|
|
8
|
-
"metadata": "gauge.metadata.json",
|
|
9
8
|
"sideEffects": false,
|
|
10
9
|
"name": "@delon/chart/gauge"
|
|
11
10
|
}
|
|
@@ -3,6 +3,7 @@ import type { Event } from '@antv/g2';
|
|
|
3
3
|
import { G2BaseComponent } from '@delon/chart/core';
|
|
4
4
|
import { BooleanInput, NumberInput } from '@delon/util/decorator';
|
|
5
5
|
import type { NzSafeAny } from 'ng-zorro-antd/core/types';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
6
7
|
export interface G2MiniAreaData {
|
|
7
8
|
x: NzSafeAny;
|
|
8
9
|
y: NzSafeAny;
|
|
@@ -34,4 +35,6 @@ export declare class G2MiniAreaComponent extends G2BaseComponent {
|
|
|
34
35
|
readonly clickItem: EventEmitter<G2MiniAreaClickItem>;
|
|
35
36
|
install(): void;
|
|
36
37
|
changeData(): void;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<G2MiniAreaComponent, never>;
|
|
39
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<G2MiniAreaComponent, "g2-mini-area", ["g2MiniArea"], { "color": "color"; "borderColor": "borderColor"; "borderWidth": "borderWidth"; "height": "height"; "fit": "fit"; "line": "line"; "animate": "animate"; "xAxis": "xAxis"; "yAxis": "yAxis"; "padding": "padding"; "data": "data"; "yTooltipSuffix": "yTooltipSuffix"; "tooltipType": "tooltipType"; }, { "clickItem": "clickItem"; }, never, never>;
|
|
37
40
|
}
|
package/mini-area/mini-area.d.ts
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./mini-area.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
1
4
|
export declare class G2MiniAreaModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<G2MiniAreaModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<G2MiniAreaModule, [typeof i1.G2MiniAreaComponent], [typeof i2.CommonModule], [typeof i1.G2MiniAreaComponent]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<G2MiniAreaModule>;
|
|
2
8
|
}
|
package/mini-area/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"fesm2015": "../fesm2015/mini-area.
|
|
2
|
+
"module": "../fesm2015/mini-area.mjs",
|
|
3
|
+
"es2020": "../fesm2020/mini-area.mjs",
|
|
4
|
+
"esm2020": "../esm2020/mini-area/mini-area.mjs",
|
|
5
|
+
"fesm2020": "../fesm2020/mini-area.mjs",
|
|
6
|
+
"fesm2015": "../fesm2015/mini-area.mjs",
|
|
7
7
|
"typings": "mini-area.d.ts",
|
|
8
|
-
"metadata": "mini-area.metadata.json",
|
|
9
8
|
"sideEffects": false,
|
|
10
9
|
"name": "@delon/chart/mini-area"
|
|
11
10
|
}
|
|
@@ -3,6 +3,7 @@ import type { Event } from '@antv/g2';
|
|
|
3
3
|
import { G2BaseComponent } from '@delon/chart/core';
|
|
4
4
|
import { NumberInput } from '@delon/util/decorator';
|
|
5
5
|
import type { NzSafeAny } from 'ng-zorro-antd/core/types';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
6
7
|
export interface G2MiniBarData {
|
|
7
8
|
x: NzSafeAny;
|
|
8
9
|
y: NzSafeAny;
|
|
@@ -26,4 +27,6 @@ export declare class G2MiniBarComponent extends G2BaseComponent {
|
|
|
26
27
|
readonly clickItem: EventEmitter<G2MiniBarClickItem>;
|
|
27
28
|
install(): void;
|
|
28
29
|
changeData(): void;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<G2MiniBarComponent, never>;
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<G2MiniBarComponent, "g2-mini-bar", ["g2MiniBar"], { "color": "color"; "height": "height"; "borderWidth": "borderWidth"; "padding": "padding"; "data": "data"; "yTooltipSuffix": "yTooltipSuffix"; "tooltipType": "tooltipType"; }, { "clickItem": "clickItem"; }, never, never>;
|
|
29
32
|
}
|
package/mini-bar/mini-bar.d.ts
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./mini-bar.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
1
4
|
export declare class G2MiniBarModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<G2MiniBarModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<G2MiniBarModule, [typeof i1.G2MiniBarComponent], [typeof i2.CommonModule], [typeof i1.G2MiniBarComponent]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<G2MiniBarModule>;
|
|
2
8
|
}
|
package/mini-bar/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"fesm2015": "../fesm2015/mini-bar.
|
|
2
|
+
"module": "../fesm2015/mini-bar.mjs",
|
|
3
|
+
"es2020": "../fesm2020/mini-bar.mjs",
|
|
4
|
+
"esm2020": "../esm2020/mini-bar/mini-bar.mjs",
|
|
5
|
+
"fesm2020": "../fesm2020/mini-bar.mjs",
|
|
6
|
+
"fesm2015": "../fesm2015/mini-bar.mjs",
|
|
7
7
|
"typings": "mini-bar.d.ts",
|
|
8
|
-
"metadata": "mini-bar.metadata.json",
|
|
9
8
|
"sideEffects": false,
|
|
10
9
|
"name": "@delon/chart/mini-bar"
|
|
11
10
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ChangeDetectorRef, OnChanges } from '@angular/core';
|
|
2
2
|
import { DelonLocaleService } from '@delon/theme';
|
|
3
3
|
import { NumberInput } from '@delon/util/decorator';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class G2MiniProgressComponent implements OnChanges {
|
|
5
6
|
i18n: DelonLocaleService;
|
|
6
7
|
private cdr;
|
|
@@ -8,10 +9,12 @@ export declare class G2MiniProgressComponent implements OnChanges {
|
|
|
8
9
|
static ngAcceptInputType_percent: NumberInput;
|
|
9
10
|
static ngAcceptInputType_strokeWidth: NumberInput;
|
|
10
11
|
color: string;
|
|
11
|
-
target
|
|
12
|
-
percent
|
|
13
|
-
strokeWidth
|
|
12
|
+
target?: number | null;
|
|
13
|
+
percent?: number | null;
|
|
14
|
+
strokeWidth?: number | null;
|
|
14
15
|
constructor(i18n: DelonLocaleService, cdr: ChangeDetectorRef);
|
|
15
16
|
private fixNum;
|
|
16
17
|
ngOnChanges(): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<G2MiniProgressComponent, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<G2MiniProgressComponent, "g2-mini-progress", ["g2MiniProgress"], { "color": "color"; "target": "target"; "percent": "percent"; "strokeWidth": "strokeWidth"; }, {}, never, never>;
|
|
17
20
|
}
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./mini-progress.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@delon/theme";
|
|
5
|
+
import * as i4 from "ng-zorro-antd/tooltip";
|
|
1
6
|
export declare class G2MiniProgressModule {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<G2MiniProgressModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<G2MiniProgressModule, [typeof i1.G2MiniProgressComponent], [typeof i2.CommonModule, typeof i3.DelonLocaleModule, typeof i4.NzToolTipModule], [typeof i1.G2MiniProgressComponent]>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<G2MiniProgressModule>;
|
|
2
10
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"fesm2015": "../fesm2015/mini-progress.
|
|
2
|
+
"module": "../fesm2015/mini-progress.mjs",
|
|
3
|
+
"es2020": "../fesm2020/mini-progress.mjs",
|
|
4
|
+
"esm2020": "../esm2020/mini-progress/mini-progress.mjs",
|
|
5
|
+
"fesm2020": "../fesm2020/mini-progress.mjs",
|
|
6
|
+
"fesm2015": "../fesm2015/mini-progress.mjs",
|
|
7
7
|
"typings": "mini-progress.d.ts",
|
|
8
|
-
"metadata": "mini-progress.metadata.json",
|
|
9
8
|
"sideEffects": false,
|
|
10
9
|
"name": "@delon/chart/mini-progress"
|
|
11
10
|
}
|
|
@@ -6,10 +6,12 @@
|
|
|
6
6
|
display: block;
|
|
7
7
|
width: 100%;
|
|
8
8
|
padding: 5px 0;
|
|
9
|
+
|
|
9
10
|
&__wrap {
|
|
10
11
|
position: relative;
|
|
11
12
|
background-color: @background-color-base;
|
|
12
13
|
}
|
|
14
|
+
|
|
13
15
|
&__value {
|
|
14
16
|
width: 0;
|
|
15
17
|
height: 100%;
|
|
@@ -17,10 +19,12 @@
|
|
|
17
19
|
border-radius: 1px 0 0 1px;
|
|
18
20
|
transition: all 0.4s cubic-bezier(0.08, 0.82, 0.17, 1) 0s;
|
|
19
21
|
}
|
|
22
|
+
|
|
20
23
|
&__target {
|
|
21
24
|
position: absolute;
|
|
22
25
|
top: 0;
|
|
23
26
|
bottom: 0;
|
|
27
|
+
|
|
24
28
|
&-item {
|
|
25
29
|
position: absolute;
|
|
26
30
|
top: 0;
|
|
@@ -28,6 +32,7 @@
|
|
|
28
32
|
width: 2px;
|
|
29
33
|
height: 4px;
|
|
30
34
|
border-radius: 100px;
|
|
35
|
+
|
|
31
36
|
&:last-child {
|
|
32
37
|
top: auto;
|
|
33
38
|
bottom: 0;
|