here is there code: please tell me exactly where (near the bottom) I can
place the get new data and draw additions...I have tried a few places and
keep blowing up. I am a simpleton.
apologies,
cld
<html>
<head>
<script type="text/javascript"
src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.load('visualization', '1', {'packages':['controls']});
google.setOnLoadCallback(drawVisualization);
function drawVisualization () {
var queryString = encodeURIComponent('SELECT *');
var query = new
google.visualization.Query('https://docs.google.com/spreaz/tq?gid=0&headers2&tq=
+ queryString);
query.send(function (response) {
if (response.isError()) {
alert('Error in query: ' + response.getMessage() + ' ' +
response.getDetailedMessage());
return;
}
var data = response.getDataTable();
var view = new google.visualization.DataView(data);
// Filter by Company
var CompanyFilter = new google.visualization.ControlWrapper({
'controlType': 'CategoryFilter',
'containerId': 'control_div',
'options': {
'filterColumnIndex': 1,
'ui': {
label: '',
allowTyping: false,
allowMultiple: false,
allowNone: false,
//selectedValuesLayout: 'top',
// 'caption': 'Choose metric',
cssClass: 'columnFilter_class'
}
},
state: {
selectedValues: ['LiquidFrameworks']
},
});
var RRR = new google.visualization.ChartWrapper({
'chartType': 'ComboChart',
'containerId': 'RevenueRunRate',
'options': {
'explorer': { actions: ['dragToZoom', 'rightClickToReset'] },
'focusTarget': 'category',
'width': 425,
'height': 275,
'hAxis': {direction: 1, bold: true, format: 'MMM-yy'},
'legend': 'bottom',
'title': 'Growth: (Revenue Run Rate & Bookings)',
'tooltipWidth':40,
'tooltipHeight':40,
'tooltipFontSize':12,
'vAxes': {
0: {title:'Bookings', format: '$#,###',textStyle:
{color: '#707B7C'}},
1: {title: 'Revenue Run Rate',format:
'$#,###',textStyle: {color: '#2E86C1'}}
},
'series': {1: {targetAxisIndex:0, type: 'line', lineWidth: 5,
color:'#2E86C1' , legend: {position:'bottom' }},
0: {targetAxisIndex:1, type: 'area', lineWidth:
5,curveType: 'function', lineDashStyle: [8,2],color:'#707B7C', legend:
'bottom' }
},
'animation': {
duration: 1000,
easing: 'inAndOut'
},
},
view: {
columns: [0,5,14]
},
});
var EBITDAMarg = new google.visualization.ChartWrapper({
'chartType': 'ComboChart',
'containerId': 'EBITDAMargin',
'options': {
'explorer': { actions: ['dragToZoom', 'rightClickToReset'] },
'focusTarget': 'category',
'width': 425,
'height': 275,
'hAxis': {direction: 1, format: 'MMM-yy'},
'legend': 'bottom',
'vAxes': {
1: {title:'Operating Leverage', textStyle: {color:
'3498DB'}},
0: {title: 'EBITDA Margin',textStyle: {color:
'#AAB7B8'}}
},
'colors': ['#AAB7B8','3498DB'],
'title': 'Maturity: (EBITDA Margin / Operating Leverage)',
'tooltipWidth':40,
'tooltipHeight':40,
'tooltipFontSize':12,
'seriesType': 'bars',
'series': {1: {type: 'bar'}},
'series': {0: {targetAxisIndex:0, type:'bar'},
1: {targetAxisIndex:1, type: 'line', lineWidth: 5,
curveType: 'function', lineDashStyle: [8,2]},
},
'trendlines': {1: {type: 'exponential', lineWidth: 5, tooltip:
false, labelInLegend: 'Trend Line'}},
'animation': {
duration: 1000,
easing: 'inAndOut'
},
},
'view': {
columns: [0, 8,9]
},
});
var CACTrend = new google.visualization.ChartWrapper({
'chartType': 'LineChart',
'containerId': 'CACTrend',
'options': {
'explorer': { actions: ['dragToZoom', 'rightClickToReset'] },
'focusTarget': 'category',
'width': 425,
'height': 275,
'legend': 'bottom',
'hAxis': {direction: 1, format: 'MMM-yy'},
'vAxis': { title: 'Months', format:'#'},
'colors': ['3498DB'],
'title': 'Scalability: (Payback Period)',
'tooltipWidth':40,
'tooltipHeight':40,
'tooltipFontSize':12,
'curveType':'function',
'lineWidth':6,
'series': {0: {lineDashStyle: [8,2]}},
'trendlines': { 0: {}, tooltip: false },
'animation': {
duration: 1000,
easing: 'inAndOut'
},
},
view: {columns: [0,15]},
});
var dashboard = new
google.visualization.Dashboard(document.getElementById('dashboard')).
bind([CompanyFilter], [RRR, EBITDAMarg, CACTrend]).
draw(view);
});
}
</script>
<div id="dashboard">
On Tuesday, August 2, 2016 at 11:02:09 AM UTC-5, Chip Davis wrote:
>
> I have a dashboard that queries from sheets.
>
> The response becomes my datatable.
>
> I have table charts inside my dashboard and I would like these tables to
> populate based on queries of my datatable. I can not figure out how to have
> one table (made in Chartwrapper) run a its own query. The next table would
> have a separate query. My current workaround is to build my queries inside
> sheets and place these in added columns in sheets. As a result....my
> google sheet is starting to get really cluttered. I would rather have
> these queries inside my charts (script) and keep my sheets data
> uncluttered. How do I do this?
>
> thx in advance...
>
> Chip Davis
>
--
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 [email protected].
To post to this group, send email to [email protected].
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/c1788417-9581-43ee-8d9f-d7ff5296207c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.