import Highcharts, { CSSObject } from 'highcharts'; import { LangData, PlotOptions, ChartOptions, SeriesOptions, PointOptionsObject, LegendObjectOptions } from '../_chart'; export declare type InnerTitleObjectOptions = { /** * 标题 */ text: string; /** * Y 轴偏移量 */ offsetY: number; /** * 标题样式 */ style?: CSSObject; }; export declare type InnerTitleOptions = string | InnerTitleObjectOptions; export declare type InnerSitleObjectOptions = { /** * 副标题 */ text: string; /** * Y 轴偏移量 */ offsetY: number; /** * 副标题样式 */ style?: CSSObject; }; export declare type InnerSubtitleOptions = string | InnerTitleObjectOptions; export interface PlotPieOptions extends PlotOptions { /** * 外层圆圈直径 */ size?: number; /** * 中间圆圈直径 */ innerSize?: number; /** * 中间文字,标题 */ innerTitle?: InnerTitleOptions; /** * 中间文字,副标题 */ innerSubtitle?: InnerSubtitleOptions; } export declare type LegendPointDataObject = { name: string; value: number; color: string; index: number; /** 带样式的小圆点 html 字符串 */ pointDot: string; /** 当前项所占的百分比 */ percentage?: number; }; export declare type LegendPieObjectOptions = Omit & { /** * 图例的展示列数,值为 1 时会出现图例宽度不断变小的情况,所以不做处理 * * 注:此特性依赖复杂的计算才能生效,所以当你传入 `width`、`maxHeight`等配置的时候会被无视 */ columns?: number; /** * Callback function to format each of the points' labels. The `this` * keyword refers to the point object in case of pie charts. By default * the point name is printed. */ labelFormatter?: (pointData: LegendPointDataObject) => string; }; export declare type LegendPieOptions = false | LegendPieObjectOptions; export interface ChartPieOptions extends Omit { legend?: LegendPieOptions; } export interface SeriesPieOptions extends SeriesOptions, Omit { /** * 1. number[]. 这种情况数组的值会被当作 {y: number} * 2. Array<[string, number]>. 这种情况会被当作 {name: string, y: number} */ data?: Array; } export declare function createPieOptions(langData: LangData, options?: PlotPieOptions, chartOptions?: ChartPieOptions, series?: SeriesPieOptions[], events?: Highcharts.ChartEventsOptions): Highcharts.Options;