Box and whisker graph X axis length

14 views
Skip to first unread message

Evan Panagiotopoulos

unread,
Oct 31, 2017, 7:14:06 PM10/31/17
to Google Visualization API

I am trying to figure out how to separate the X axis information for the mouseover popup.
It would be great if the x Axis had minimal information. If there were several boxes the x axis would be very difficult to read.

The code that generates the graph follows:

<script type="text/javascript" src="https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization','version':'1','packages':['corechart']}]}"></script>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
google.setOnLoadCallback(drawChart);

function drawChart() {

var data = google.visualization.arrayToDataTable([
['Data', '',
{id: 'i0', role: 'interval'},
{id: 'i1', role: 'interval'},
{id: 'i1', role: 'interval'},
{id: 'i1', role: 'interval'},
{id: 'i0', role: 'interval'}
],
['District-Wide Data - Min:1.75, 25%:3.03, Med:3.21, 75%:3.45, Max:4.00', 3.21, 1.75, 3.03, 3.21, 3.45, 4.00]
]);

var options = {
title: '2016-2017 Data - Generated on October 31, 2017, 6:50 pm',
vAxis: {gridlines: { count: 16 }},
legend:'none',
interval: {
i1: {style: 'boxes'}
},
series: {
0: { lineWidth: 0}
},
focusTarget: 'category'
};
var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
</head>

<body>
<div id="chart_div" style="width: 900px; height: 500px;"></div>
</body>


Reply all
Reply to author
Forward
0 new messages