Spaces:
Sleeping
Sleeping
Download frontend/src/app/dashboard/chart-widget/chart-widget.ts from ccjulia/zero_friction: direct link, hf CLI and curl.
- Browser
- Download file 967 Bytes
-
https://huggingface.co/spaces/ccjulia/zero_friction/resolve/main/frontend/src/app/dashboard/chart-widget/chart-widget.ts
- Command line
-
hf download hf://spaces/ccjulia/zero_friction/frontend/src/app/dashboard/chart-widget/chart-widget.ts
-
curl -L -o chart-widget.ts https://huggingface.co/spaces/ccjulia/zero_friction/resolve/main/frontend/src/app/dashboard/chart-widget/chart-widget.ts
967 Bytes
| import { Component, input } from '@angular/core'; | |
| import { MatCard, MatCardContent } from '@angular/material/card'; | |
| import { NgxEchartsDirective, provideEchartsCore } from 'ngx-echarts'; | |
| import * as echarts from 'echarts/core'; | |
| import { LineChart, BarChart } from 'echarts/charts'; | |
| import { | |
| TitleComponent, | |
| TooltipComponent, | |
| GridComponent, | |
| LegendComponent, | |
| } from 'echarts/components'; | |
| import { CanvasRenderer } from 'echarts/renderers'; | |
| import type { EChartsOption } from 'echarts'; | |
| echarts.use([ | |
| LineChart, | |
| BarChart, | |
| TitleComponent, | |
| TooltipComponent, | |
| GridComponent, | |
| LegendComponent, | |
| CanvasRenderer, | |
| ]); | |
| ({ | |
| selector: 'app-chart-widget', | |
| imports: [MatCard, MatCardContent, NgxEchartsDirective], | |
| providers: [provideEchartsCore({ echarts })], | |
| templateUrl: './chart-widget.html', | |
| styleUrl: './chart-widget.scss', | |
| }) | |
| export class ChartWidget { | |
| title = input.required<string>(); | |
| options = input.required<EChartsOption>(); | |
| } | |