gpt4 book ai didi

jqplot水平线

转载 作者:行者123 更新时间:2023-12-04 23:05:06 25 4
gpt4 key购买 nike

似乎无法显示水平线,我看过以前的帖子,但没有任何效果...也许我错过了导入?图表本身显示得很好。

    $(document).ready(function(){
var line1 = [['January', 1], ['February', 2], ['March', 3],
['April', 4], ['May', 5], ['June', 6], ['July', 7], ['August', 8],
['September', 9], ['October', 10], ['November', 11], ['December', 12]];
//alert(<?=$graph[1]['st']?>);
var plot1 = $.jqplot('settle_graph', [line1], {
title: 'Monthly Settlements',
grid:{drawBorder: false, shadow:false},
canvasOverlay: {
show: true,
objects: [
{horizontalLine: {
name: '# Settlements from Budget',
y: 6,
lineWidth: 3,
color: '#444444',
shadow: true,
show:true,
lineCap: 'butt',
xOffset: 0
}}
]
},
series:[{renderer:$.jqplot.BarRenderer}],
seriesDefaults: {
rendererOptions: {
varyBarColor : true,
barPadding: 2, // number of pixels between adjacent bars in the same
// group (same category or bin).
barMargin: 3, // number of pixels between adjacent groups of bars.
barDirection: 'vertical', // vertical or horizontal.
barWidth: null//, // width of the bars. null to calculate automatically.
//shadowOffset: 2, // offset from the bar edge to stroke the shadow.
//shadowDepth: 5, // nuber of strokes to make for the shadow.
//shadowAlpha: 0.8, // transparency of the shadow.
}
},
axesDefaults: {
tickRenderer: $.jqplot.CanvasAxisTickRenderer ,
tickOptions: {
angle: -30,
fontSize: '10pt'
},rendererOptions: {
baselineWidth: 1,
baselineColor: '#444444',
drawBaseline: true
}
},
axes: {
xaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
tickOptions:{
showGridline: false
}
},
yaxis: {
tickOptions:{
showGridline: false
}
}
},
seriesColors: ["#4FCBEA", "#4FCBEA", "#4FCBEA", "#4FCBEA",
"#4FCBEA", "#4FCBEA", "#4FCBEA", "#4FCBEA",
"#4FCBEA", "#4FCBEA", "#4FCBEA", "#4FCBEA"],
});
});

有人做过简单的水平线吗?

最佳答案

您需要包含 jqplot.canvasOverlay.js显示叠加的插件

关于jqplot水平线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14371583/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com