-
Notifications
You must be signed in to change notification settings - Fork 481
/
Copy path23317.85b52cd5d3f05d24.js
1 lines (1 loc) · 1.24 KB
/
23317.85b52cd5d3f05d24.js
1
(self.webpackChunkdemo=self.webpackChunkdemo||[]).push([[23317],{23317:e=>{e.exports="import {AsyncPipe, NgForOf} from '@angular/common';\nimport {Component} from '@angular/core';\nimport {changeDetection} from '@demo/emulate/change-detection';\nimport {encapsulation} from '@demo/emulate/encapsulation';\nimport {TuiLegendItem, TuiRingChart} from '@taiga-ui/addon-charts';\nimport {TuiAmountPipe} from '@taiga-ui/addon-commerce';\nimport {TuiHovered, tuiSum} from '@taiga-ui/cdk';\n\n@Component({\n standalone: true,\n exportAs: \"Example1\",\n imports: [AsyncPipe, NgForOf, TuiAmountPipe, TuiHovered, TuiLegendItem, TuiRingChart],\n templateUrl: './index.html',\n styleUrls: ['./index.less'],\n encapsulation,\n changeDetection,\n})\nexport default class Example {\n protected activeItemIndex = NaN;\n\n protected readonly value = [13769, 12367, 10172, 3018, 2592];\n protected readonly sum = tuiSum(...this.value);\n protected readonly labels = ['Food', 'Cafe', 'OSS', 'Taxi', 'Other'];\n\n protected isItemActive(index: number): boolean {\n return this.activeItemIndex === index;\n }\n\n protected onHover(index: number, hovered: boolean): void {\n this.activeItemIndex = hovered ? index : NaN;\n }\n}\n"}}]);