var graphOptions = { title: 'Performance', seriesType: 'bars', series: { vAxes: {0: {title:'t1'}, 1: {title:'t2'}} }, height:600, width:1200, chartArea: {top:50}, isStacked: false, hAxis: { title:'', titleTextStyle: { bold: true, italic: false, }, slantedText: true, }, vAxis: { title:'', textPosition:"out", titleTextStyle: { bold: true, italic: false, }, viewWindow: { min: 0, }, }, };
function graphIt(){ : // dynamically set graphOptions according to the user requests graphOptions.vAxis.title="Duration (Hours:Minutes)"; graphOptions.title="Duration of all Plans"; graphOptions.series.vAxes=[{title:'Could be anything'}, {title:'Number of Jobs'}]; graphOptions.series={3: {type: 'steppedArea', areaOpacity:0.05, targetAxisIndex:1}, 4: {type: 'steppedArea', areaOpacity:0.05, targetAxisIndex:1}}; graphOptions.hAxis.title="Plans (completed/aborted)"; graphOptions.title+=" over "+timeScale; : // dynamically get graphData according to the user requests mainService.getGraphData(graphCallback, ......); }
function graphCallback(data) { var chart = new google.visualization.ComboChart(document.getElementById('chartDiv')); graphData = new google.visualization.DataTable(data); chart.draw(graphData, graphOptions); : }
series: {
2: {
targetAxisIndex:1
}},
vAxes: {
1: {
title:'Losses',
textStyle: {color: 'red'}
}
}--
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/36eaf217-c982-4549-b6aa-a8326d64f32b%40googlegroups.com.
--
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/1783b0b8-768c-45a2-be5a-5b279b12deec%40googlegroups.com.
var chart = new google.visualization.ComboChart(document.getElementById('chartDiv')); graphData = new google.visualization.DataTable(data); chart.draw(graphData, graphOptions);Hi Daniel,Please explain further. I thought that I just call chart.draw() and it renders the graph in the named <div>.What else is needed?var chart = new google.visualization.ComboChart(document.getElementById('chartDiv'));graphData = new google.visualization.DataTable(data);chart.draw(graphData, graphOptions);
On Tuesday, December 22, 2015 at 7:29:27 PM UTC+2, Daniel LaLiberte wrote:The second problem sounds like you are rendering the chart when it is not yet displayed. If so, then the text measuring functionality thinks all your text has zero size. We don't have a fix for that, but a workaround is simply to arrange that you only draw the chart when it is displayed.On Tue, Dec 22, 2015 at 11:44 AM, Steve Morris <sdmo...@gmail.com> wrote:Hi Daniel,That now works ;-)Can you also relate to the other problem I noted, that after refreshing the page the legend is occasionally scrunched up and the hAxis title overwrites the hAxis text - as shown in the second bitmap.This is using the latest version of Chrome - Version 47.0.2526.106 and Win10Thanks,Steve
--
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/141a6f95-b37b-4ebd-ad62-c72d254487b2%40googlegroups.com.
div(id="tabView") div(id="chartDiv" ng-show="pbmainController.waitingForGraphCalls===0") div(ng-show="pbmainController.waitingForGraphCalls>0") md-progress-circular(md-mode="indeterminate")
vm.waitingForGraphCalls=1;
pbmainService.getGraphData(graphCallback, .....);The controller receives the data in the callback, sets up the graph and clears the waitingForGraphCalls flag, hiding the "in progress" indicator and showing the graph. I also tried clearing the waitingForGraphCalls flag before calling draw() but that did not help.
function graphCallback(data) {
var chart = new google.visualization.ComboChart(document.getElementById('chartDiv'));
graphData = new google.visualization.DataTable(data);
chart.draw(graphData, graphOptions);
Is that clear enough for you to see why it is displaying incorrectly?
vm.waitingForGraphCalls=0;
}
--
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/5731b7f8-c9a5-4b7f-8027-14ad12346625%40googlegroups.com.