누적 가로 막대가 난 단지 두 가지 사실에 매우 간단한 수평 누적 막대를 렌더링합니다. 어떤 축도없이. 이처럼JQplot - 두 사실
: My target.
하지만 내가 할 수있는 유일한 방법은 My actuell Version입니다.
문제는 두 개의 값 (예 : "2"및 "7") 만 삽입하면 "7"에 대해 하나의 막대 만 표시된다는 것입니다. 두 번째 문제는이 작은 윤곽. 이 문제를 해결하는 방법을 모른다. 어떤 아이디어?
내 코드 : 그것은 X- 축에 padMin: 0
설정과 같은
$(document).ready(function(){
var s1 = [2];
var s2 = [7];
var s3 = [10];
plot3 = $.jqplot('chart1', [s1, s2, s3], {
// Tell the plot to stack the bars.
stackSeries: true,
captureRightClick: true,
seriesDefaults:{
renderer:$.jqplot.BarRenderer,
rendererOptions: {
barDirection: 'horizontal',
// Put a 30 pixel margin between bars.
// barMargin: 30,
// Highlight bars when mouse button pressed.
// Disables default highlighting on mouse over.
highlightMouseDown: true
},
pointLabels: {show: true}
},
axes: {
yaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
},
xaxis: {
// Don't pad out the bottom of the data range. By default,
// axes scaled as if data extended 10% above and below the
// actual range to prevent data points right on grid boundaries.
// Don't want to do that here.
padMin: 0,
//max: 15,
}
},
axesDefaults:{
showTicks: false,
showTickMarks: false,
},
legend: {
show: false,
location: 'e',
placement: 'outside'
},
grid:{
drawGridlines: false,
borderWidth: 0,
shadow: false,
background:'#ffffff',
gridLineColor: '#FFFFFF',
},
});
// Bind a listener to the "jqplotDataClick" event. Here, simply change
// the text of the info3 element to show what series and ponit were
// clicked along with the data for that point.
$('#chart3').bind('jqplotDataClick',
function (ev, seriesIndex, pointIndex, data) {
$('#info3').html('series: '+seriesIndex+', point: '+pointIndex+', data: '+data);
}
);
});
대단히 감사합니다. 이제 작동합니다. tickOptions : fontSize : '0' – user2728316
btw : 어떻게 값의 글꼴 크기를 변경할 수 있습니까? – user2728316