qq-echarts
v0.0.25
Published
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.2.0.
Downloads
18
Readme
QqEcharts
This library was generated with Angular CLI version 18.2.0.
Code scaffolding
Run ng generate component component-name --project qq-echarts
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project qq-echarts
.
Note: Don't forget to add
--project qq-echarts
or else it will be added to the default project in yourangular.json
file.
Build
Run ng build qq-echarts
to build the project. The build artifacts will be stored in the dist/
directory.
Publishing
After building your library with ng build qq-echarts
, go to the dist folder cd dist/qq-echarts
and run npm publish
.
Running unit tests
Run ng test qq-echarts
to execute the unit tests via Karma.
Further help
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.
useing
import { EchartPropsType, QqEchartsComponent, DataInfoType, DataInfoVm } from "qq-echarts";
@component({
selector:'xxx',
standalone:true,
imports:[ QqEchartsComponent]
template:`
<lib-qq-echarts [rawData]="echareRawData" [stageHeight]="700" />
`
})
export class XXXComponent implements OnInit {
echareRawData!: EchartPropsType;
ngOnInit(){
of(response).subscribe((res)=>{
const currentE = res?.dataInfo?.map((item: DataInfoVm, idx: number) => {
return {
...item,
rawIdx: idx
}
}).filter((item: DataInfoVm) => item.curveFlag) || [];
this.echareRawData = {
monitorItemType: res?.stationInfo?.monitorItemType || '',
dataInfo: currentE as DataInfoType[],
dataVMS: res.dataVMS as (string | number)[][]
}
});
}
}