Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// 开始配置坐标轴
chart.axis('key', {
label: function label(text) {
return {
text: text + ' ' + series[0].xExtAlias, // 格式化坐标轴显示文本
};
},
grid: grid ? {
stroke: '#d9d9d9',
lineWidth: 1,
lineDash: [2, 2],
} : null
});
chart.axis('value', {
line: F2.Util.mix({}, F2.Global._defaultAxis.line, {
top: false
}),
label: function label(text) {
if (text > 0) {
return {
text: text + ' ' + series[0].yExtAlias,
};
}
}
});
//配置坐标轴的伸长比
if (xAxis) {
if(xAxis.htAlign) {
xAxis.label = util.label;
}