Hi, i feel like i've been going to over and over on the google site trying to add the option to filter on the 0 index of my data. what am i doing wrong?
<html>
<head>
<META HTTP-EQUIV="refresh" CONTENT="60">
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {packages: ['corechart', 'bar']});
google.charts.setOnLoadCallback(drawStacked);
function drawStacked() {
var data = new google.visualization.arrayToDataTable([
['folder', 'ready', 'freelanced', 'ready to QA' , 'placeholder' , 'not ready'],
['/Volumes/photorepos/Partners/Christopher_Banks/post/CB_instock/3' , 0, 0, 0, 0, 2],
['/Volumes/photorepos/Partners/Christopher_Banks/post/CB_instock/4' , 0, 0, 0, 0, 1],
['/Volumes/photorepos/Partners/Christopher_Banks/post/CB_instock/5' , 0, 0, 0, 0, 2],
['/Volumes/photorepos/Partners/Christopher_Banks/post/CB_instock/18' , 0, 0, 0, 0, 1],
['/Volumes/photorepos/Partners/Aeropostale/post/instock/1' , 0, 0, 0, 0, 9],
['/Volumes/photorepos/Partners/Aeropostale/post/instock/2' , 0, 0, 0, 0, 32],
['/Volumes/photorepos/Partners/Aeropostale/post/instock/9' , 0, 0, 0, 0, 33],
['/Volumes/photorepos/Partners/Aeropostale/post/instock/13' , 0, 0, 0, 0, 4],
['/Volumes/photorepos/Partners/Maurices/Post/instock/7' , 13, 0, 0, 0, 0],
['/Volumes/photorepos/Partners/Maurices/Post/instock/8' , 40, 0, 0, 0, 1],
['/Volumes/photorepos/Partners/Dress_Barn/Post/instock/RUSH' , 37, 0, 0, 0, 0],
['/Volumes/photorepos/Partners/Dress_Barn/Post/instock/1' , 0, 0, 0, 0, 1],
['/Volumes/photorepos/Partners/Dress_Barn/Post/instock/5' , 0, 0, 0, 0, 1],
['/Volumes/photorepos/Partners/Dress_Barn/Post/instock/7' , 12, 0, 0, 0, 0],
['/Volumes/photorepos/Partners/Dress_Barn/Post/instock/8' , 12, 0, 0, 0, 1],
['/Volumes/photorepos/Partners/NYCompany/post/instock/3' , 0, 0, 0, 0, 1],
['/Volumes/photorepos/Partners/NYCompany/post/instock/5' , 0, 0, 0, 0, 81],
['/Volumes/photorepos/Partners/NYCompany/post/instock/6' , 0, 0, 0, 0, 2],
['/Volumes/photorepos/Partners/HenriBendel/post/instock/6' , 112, 0, 0, 0, 10],
['/Volumes/photorepos/Partners/HenriBendel/post/instock/8' , 20, 0, 0, 0, 6],
['/Volumes/photorepos/Partners/Uniqlo/Post/instock/8' , 88, 0, 0, 0, 1],
]);
var options = {
chartArea:{left:"30%",top:"5%",width:"60%",height:"50%"},
width: 1500,
height: 1800,
colors: ['#00a591', '#ECDB54', '#6B5B95', '808080', '#E94B3C'],
isStacked: true,
fontSize: 11,
title: 'Folder Count 04-05-18 03:20:01',
chartType: 'ComboChart',
filterColumnIndex: 0
};
var chart = new google.visualization.BarChart(document.getElementById('dual_x_div'));
chart.draw(data, options);
};
</script>
</head>
<body>
<div id="dual_x_div" style="width: 1500px; height: 700px;"></div>
</body>
</html>Enter code here...
--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/8af93951-0fa1-439d-a28a-3c8cd1ae3a65%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Employee Name');
data.addColumn('date', 'Start Date');
data.addRows(6);
data.setCell(0, 0, 'Mike');
data.setCell(0, 1, new Date(2008, 1, 28));
data.setCell(1, 0, 'Bob');
data.setCell(1, 1, new Date(2007, 5, 1));
data.setCell(2, 0, 'Alice');
data.setCell(2, 1, new Date(2006, 7, 16));
data.setCell(3, 0, 'Frank');
data.setCell(3, 1, new Date(2007, 11, 28));
data.setCell(4, 0, 'Floyd');
data.setCell(4, 1, new Date(2005, 3, 13));
data.setCell(5, 0, 'Fritz');
data.setCell(5, 1, new Date(2007, 9, 2));
// Create a view that shows everyone hired since 2007.
var view = new google.visualization.DataView(data);
view.setRows(view.getFilteredRows([{column: 1, minValue: new Date(2007, 0, 1)}]));
var table = new google.visualization.Table(document.getElementById('test_dataview'));
table.draw(view, {sortColumn: 1});Then when you draw the chart, pass the view object instead of the data object.