我有一个 jqxchart,其中一切都完美无缺。唯一的问题是图表的 categoryAxis 上的文本。文本以水平方向出现,并与图表的其他文本重叠。任何人都可以帮我更改 categoryAxis 上显示的文本的方向吗?这是我正在使用的代码
function BindServerErrorChart() {
// prepare chart data
var sampleData = [
{ Server: 'Server1', Error: 6 },
{ Server: 'Server2', Error: 50 },
{ Server: 'Server3', Error: 31 },
{ Server: 'Server4', Error: 78 },
{ Server: 'Server5', Error: 19 },
{ Server: 'Server6', Error: 60.90 }
];
// prepare jqxChart settings
var settings = {
title: "Errors By server",
description: "",
showLegend: true,
enableAnimations: false,
padding: { left: 20, top: 5, right: 20, bottom: 5 },
titlePadding: { left: 90, top: 0, right: 0, bottom: 10 },
source: sampleData,
categoryAxis:
{
dataField: 'Server',
showGridLines: false,
flip: false
},
colorScheme: 'scheme01',
seriesGroups:
[
{
type: 'column',
orientation: 'horizontal',
columnsGapPercent: 100,
toolTipFormatSettings: { thousandsSeparator: ',' },
valueAxis:
{
flip: true,
unitInterval: 10,
displayValueAxis: true,
description: '',
formatFunction: function (value) {
return parseInt(value);
}
},
series: [
{ dataField: 'Error', displayText: 'Servers' }
]
}
]
};
// setup the chart
$('#ServerErrorChart').jqxChart(settings);
}