目前option的axisLabel没有封装formatter,无法对x轴刻度标签的内容格式进行修改。而echarts中是可以支持修改的
Code: Select all
interface AxisLabelBaseOption extends Omit<TextCommonOption, 'color'> {
show?: boolean;
inside?: boolean;
rotate?: number;
showMinLabel?: boolean;
showMaxLabel?: boolean;
alignMinLabel?: TextAlign;
alignMaxLabel?: TextAlign;
verticalAlignMinLabel?: TextVerticalAlign;
verticalAlignMaxLabel?: TextVerticalAlign;
margin?: number;
rich?: Dictionary<TextCommonOption>;
/**
* If hide overlapping labels.
*/
hideOverlap?: boolean;
customValues?: (number | string | Date)[];
color?: ColorString | ((value?: string | number, index?: number) => ColorString);
overflow?: TextStyleProps['overflow'];
}