2
jQuery.flot을 사용하여 프로젝트에서 사용자 지정 차트를 만들었지 만 Y 축 순서를 반전해야합니다. 이제 보텀 턴에서 최소값과 최대 값에서 보텀 톤의 최대 값과 맨의 최소값을 가져야합니다.jQuery.flot을 사용하여 Y 축 반대로
이 내 예입니다 http://pastehtml.com/view/1doilsa.html
그러나 inverseTransform 옵션이 작동하지 않을 것 같다.
<body>
script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"
script type="text/javascript" src="http://flot.googlecode.com/svn/trunk/jquery.flot.js"
<div class="plot-lines" style="width: 500px; height: 400px;"></div>
<script type="text/javascript">
$.plot($('.plot-lines'),
[{
data: [ [0, null], [1, 3], [2, 6], [3, 2], [4, null] ],
lines: {
show: true
},
points: {
show: true
}
}],
{
xaxis: {
ticks: [ [0, ''], [1, 'Race 1'], [2, 'Race 2'], [3, 'Race 3'], [4, ''] ]
},
yaxis: {
tickDecimals: 0,
inverseTransform: function (v) { return -v; }
}
}
);
</script>
</body>
도와 주셔서 감사합니다 불행히도
감사합니다. 매력처럼 작동합니다! – Lito
v0.7의 flot이 방금 출시되었으므로, 다음 버전으로 업데이트 할 수 있습니다. – Ryley