Ultimate goal: Have a linked table that with nice layout in google docs
(slide) from data in google sheets.
Obvious way for linking functionality: Insert a TableChart from google
sheets into google docs.
Problem: Layout is horrible and in google sheets chart editor no
possibilities to do something about it.
After some digging I found that:
Embedded chart builder accepts options
An option op TableChart option is to give CSSClassnames to header rows etc.
What I have so far:
function newChart() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
var chart = sheet.newChart()
.setChartType(Charts.ChartType.TABLE)
.addRange(sheet.getRange("A1:C8"))
.setPosition(5, 5, 0, 0)
.setOption('allowHtml', true)
.setOption('height', 500)
.setOption('cssClassNames', {headerRow: 'HeaderRow'})
.build();
sheet.insertChart(chart);
}
Million dollar questions. How can I set the CSS ClassNames in my app code
so that it is taken into account when building the chart??
Or am I trying to do the impossible. Are there other, simpler ways.
Thanks
--
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/e144b4e1-df0d-4d1a-8596-27bfc7e31cd5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.