有没有人在我的代码中看到问题为什么这个边框会出现? 我知道要求解决问题不是“最佳实践”,但我已经浪费了几个小时而无法修复它...... 我确定它只是一个简单的配置问题,我只是看不到,但在jqplot中有更多练习的人可以在几秒钟内找到...
以下是我正在使用的代码:
jQuery.jqplot(this.getNonHasheContainerName(), chartDrawingData, {
animate: false,
seriesColors: barChartColors,
seriesDefaults: barChartSeriesDefaults,
grid: ChartGridDefaults,
series: this.getBarChartSeriesLabels(chartMetadata.series),
legend: barChartLegendDefaults,
title: { show: false },
axes: barChartAxisDefaults(ticks, chartMetadata.showGrid)
});
var barChartColors = ['#9FC0DF', '#EFAD81'];
var barChartSeriesDefaults = {
renderer: jQuery.jqplot.BarRenderer,
rendererOptions: {
barMargin: 10,
highlightMouseOver: true,
animation:
{
speed: 2500
}
},
pointLabels: { show: true },
shadow: false
};
var barChartLegendDefaults = {
show: true,
location: 'e',
placement: 'outsideGrid'
};
var barChartAxisDefaults = function (ticks, showGrid) {
return {
xaxis: {
show: false,
renderer: jQuery.jqplot.CategoryAxisRenderer,
tickRenderer: jQuery.jqplot.CanvasAxisTickRenderer,
ticks: ticks,
tickOptions: {
angle: 45,
fontSize: "11px",
showGridline: false,
showMark: true,
//labelPosition: 'end',
mark: 'inside',
markSize: 10
},
},
yaxis: {
show: false,
min: 0,
tickOptions: {
showMark: false,// showGrid,
showLabel: false,// showGrid,
showGridline: false,
tickInterval: 1,
formatString: '%d',
//borderWidth: 1
},
},
x2axis: {
show: false
},
y2axis: {
show: false
}
};
};
var ChartGridDefaults = {
shadow: false,
background: '#ffffff',
borderWidth: 1,
drawGridlines: false,
drawBorder: false
};
var pieChartSeriesDefaults = {
renderer: jQuery.jqplot.PieRenderer,
rendererOptions: {
showDataLabels: true,
dataLabels: 'value',
fill: true,
sliceMargin: 2,
lineWidth: 5
},
shadow: false
};
var pieChartLegendDefaults = {
show: true,
location: 'e'
};
答案 0 :(得分:0)
我知道了!!!
渲染器还有另一个隐藏(或者我已在文档中监督它)设置:
yaxis: {
show: false,
min: 0,
tickOptions: {
showMark: false,// showGrid,
showLabel: false,// showGrid,
showGridline: false,
tickInterval: 1,
formatString: '%d',
},
**rendererOptions: {
drawBaseline: false
}**
}