12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- import ChartTypes from './ChartTypes'
- import {
- PIVOT_CHART_FONT_FAMILIES,
- PIVOT_DEFAULT_FONT_COLOR,
- CHART_PIE_LABEL_POSITIONS
- } from 'app/globalConstants'
- import { IChartInfo } from 'containers/Widget/components/Widget'
- const pie: IChartInfo = {
- id: ChartTypes.Pie,
- name: 'pie',
- title: '饼图',
- icon: 'icon-chartpie',
- coordinate: 'cartesian',
- rules: [{ dimension: [0, 9999], metric: 1 }, { dimension: 0, metric: [2, 9999] }],
- dimetionAxis: 'col',
- data: {
- cols: {
- title: '列',
- type: 'category'
- },
- rows: {
- title: '行',
- type: 'category'
- },
- metrics: {
- title: '指标',
- type: 'value'
- },
- filters: {
- title: '筛选',
- type: 'all'
- },
- color: {
- title: '颜色',
- type: 'category'
- }
- // tip: {
- // title: '提示信息',
- // type: 'value'
- // }
- },
- style: {
- label: {
- showLabel: false,
- pieLabelPosition: CHART_PIE_LABEL_POSITIONS[0].value,
- labelFontFamily: PIVOT_CHART_FONT_FAMILIES[0].value,
- labelFontSize: '12',
- labelColor: PIVOT_DEFAULT_FONT_COLOR,
- labelParts: ['dimensionValue', 'indicatorValue', 'percentage']
- },
- legend: {
- showLegend: true,
- legendPosition: 'right',
- selectAll: true,
- fontFamily: PIVOT_CHART_FONT_FAMILIES[0].value,
- fontSize: '12',
- color: PIVOT_DEFAULT_FONT_COLOR
- },
- spec: {
- roseType: false,
- circle: false
- }
- // toolbox: {
- // showToolbox: false
- // }
- }
- }
- export default pie
|