import { ElementRef, OnInit } from '@angular/core'; import { CfChartComponent } from '../chart/chart.component'; import { TemplateService } from '../../services/template-service/template.service'; import { CfEventService } from '../../services/event-service/event.service'; /** *
CfPieChart component is created based on Ngx-charts and * CfChartComponet
*
* import {{'{'}} PieChartModel {{'}'}} from 'cedrus-fusion'
* import {{'{'}} ChartStylingModel {{'}'}} from 'cedrus-fusion'
* <cf-pie-chart></cf-pie-chart>
*
* {{'{'}}
* data: any[], // Data to show
* view: number[] // Dimensions of chart [width, height] by px
* gradient: boolean, // Fill elements with a gradient instead of a solid color. Default: false.
* showLegend: boolean, // If to show the legend. Default: true.
* colorScheme: ChartsColorScheme, // Array with string css color values. Default: ['#5AA454', '#A10A28', '#C7B42C', '#AAAAAA'].
* showXAxis: boolean, // If to show the x axis. Default: true.
* showYAxis: boolean, // If to show the y axis. Default: true.
* showXAxisLabel: boolean, // If to show the x axis label. Default: true.
* showYAxisLabel: boolean, // If to show the y axis label. Default: true.
* xAxisLabel: string, // The x axis label
* yAxisLabel: string, // The y axis label
* donut: boolean, // Should pie chart to be like normal circle (true) or filled circle(false). Default: false.
* showLabels: boolean, // Show or hide the labels. Default: true.
* explodeSlices: boolean, // Make the radius of each slice proportional to it's value. Default: false.
* legendPosition: string, // Legend position. Can be: top, right, bottom, left. Default: right.
* chartAlignment: string, // Alignment of chart. Can be: start, center, end. Default: start.
* {{'}'}}
* Example of data object:
*data = [
* {{'{'}} "name": "Germany", "value": 8940000 {{'}'}},
* {{'{'}} "name": "USA", "value": 5000000 {{'}'}},
* {{'{'}} "name": "France", "value": 7200000 {{'}'}}
* ]
* Example of chart options:
*myChartModel = new PieChartModel({{'{'}}
* data: this.data,
* donut: true,
* explodeSlices: true
* {{'}'}});
* Styling
*{{'{'}}
* barsContainerWidth: string, // It is css value for chart bars container width. Default: 100%.
* barsContainerHeight: string', // It is css value for chart bars container height. Default: 200px.
* container: StylingObject, // Styling of chart container
* {{'}'}}
* Example of styling object:
*chartStylingModel = new ChartStylingModel({{'{'}}
* barsContainerWidth: '100%',
* barsContainerHeight: '200px',
* container: {{'{'}}
* class: 'my-chart-class'
* {{'}'}}
* {{'}'}});
*/
export declare class CfPieChartComponent extends CfChartComponent implements OnInit {
elementRef: ElementRef;
/**@hidden */ eventService: CfEventService;
/** @hidden*/
cfChartHost: any;
/** @hidden*/
cfNgxChart: any;
/**
* Should doughnut instead of pie slices
*/ donut: boolean; /** *Show or hide the labels
*/ showLabels: boolean; /** *Make the radius of each slice proportional to it's value
*/ explodeSlices: boolean; /** @hidden*/ constructor(elementRef: ElementRef, /**@hidden */ templateService: TemplateService, /**@hidden */ eventService: CfEventService); /** @hidden*/ ngOnInit(): void; }