현재 콤보 차트에서 Z 축을 조정할 수있는 방법이 없습니다. 따라서 수행중인 방식대로 수행 할 수 없습니다.
그러나 까다로운 사람이라면 XY 분산 형 차트를 사용하여 같은 종류의 차트를 다시 만들 수 있습니다.
예 (구글 놀이터에서 복사 - 붙여 넣기) :
<!--
You are free to copy and use this sample in accordance with the terms of the
Apache license (http://www.apache.org/licenses/LICENSE-2.0.html)
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>
Google Visualization API Sample
</title>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load('visualization', '1', {packages: ['corechart']});
</script>
<script type="text/javascript">
function drawVisualization() {
// Create and populate the data table.
var data = new google.visualization.DataTable();
data.addColumn('number', 'X');
data.addColumn('number', 'Sales');
data.addColumn('number', 'Targets');
data.addRows([
[1, 0, null],
[1, 1, null],
[1, null, null],
[2, 0, null],
[2, 3, null],
[2, null, null],
[3, 0, null],
[3, 3, null],
[3, null, null],
[0.5,null,1.5],
[1.5,null,1.5],
[1.5,null,null],
[1.5,null,2.5],
[2.5,null,2.5],
[2.5,null,null],
[2.5,null,3],
[3.5,null,3],
]);
// Create and draw the visualization.
var chart = new google.visualization.ScatterChart(
document.getElementById('visualization'));
chart.draw(data, {
width: 600,
height: 400,
series: {0:{color: 'black', lineWidth: 40, pointSize: 0}, 1:{color: 'red', lineWidth: 10, pointSize: 0}} });
}
google.setOnLoadCallback(drawVisualization);
</script>
</head>
<body style="font-family: Arial;border: 0 none;">
<div id="visualization" style="width: 600px; height: 400px;"></div>
</body>
</html>
감사합니다! 그건 내 X 축을 제외하고 다른 범주에 대한 문자열입니다 작동합니다. 그것은 숫자를 사용하는 사람에게는 좋은 대답입니다. – Fred
글쎄, 내 예제에 문자열을 추가하는 방법은 여러 가지가 있습니다. 예를 들어, 최소/최대 0, 데이터 없음, 레이블 아래에 숨겨진 축/격자 선이있는 보조 선 또는 열 그래프를 작성하는 방법이 있습니다. – jmac
나는 그것을 고려하지 않았다. 다음 주에 현재 업데이트를 릴리스 한 후 한 번 살펴 보겠습니다. – Fred