Hi, all!

My intention is to draw a bar chart that will show information about a 
program execution.

The bar height itself will show the execution duration in seconds (vAxis), 
but I'd like the bar color to show the executions status (eg. red for 
failed execution, blue for correct execution)

var data = new google.visualization.arrayToDataTable([
            ["Date", "Status", "Duration (s)"],
            ["13/02/2017 13:42:58", 0, 29],
            ["13/02/2017 16:53:07", 1, 41],
            ["13/02/2017 16:54:36", 0, 26]
            ]);

Status 0 is correct, 1 is failed execution.

I've been checking the forum but I couldn't find any meaningful info. Is 
there a way to do what I want? Perhaps an if/else block in the "colors" 
array from options??

Thanks in advance for your answers! Best regards!

-- 
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/813f1a4c-4b00-4063-956f-480647f10234%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • [visualization-api] Charts... Ignacio Castañeira

Reply via email to