Hello,

I have a dashboard setup similar to this: 
http://jsfiddle.net/asgallant/ZmVcZ/ and am hoping to create a column chart 
of forecasted precipitation intensity over time.  My data set being passed 
to the graph is in reflectivity values, ranging between -20 and 100 dbz, 
but I am hoping to have more user-friendly units displayed on the Y axis 
(eg "light, medium, heavy").  In addition, I am hoping to color-code the 
bars to colors consistent to the weather radar (eg bars that are displaying 
"heavy" precipitation should be red).  
So, two questions; 

1) Is there an easy way to display a numeric dataset with the labels on the 
Y-axis being descriptors for specific buckets of that data?
2) Is there any way to change the color of the columns to match the value 
of each column?

Thank you in advance!

Here is my code so far:
        
        
var dashboard = new google.visualization.Dashboard(
            document.getElementById('dashboard'));


        var control = new google.visualization.ControlWrapper({
            'controlType': 'ChartRangeFilter',
            'containerId': 'control',
            'options': {
                // Filter by the date axis.
                'filterColumnIndex': 0,
                'ui': {
                    'chartType': 'LineChart',
                    'chartOptions': {
                        'chartArea': {'width': '90%'},
                        'hAxis': {
                            'format': ['yyyy-MM-dd']
                        }
                    }
                }
            }
        });


        var chart = new google.visualization.ChartWrapper({
            'chartType': 'LineChart',
            'containerId': 'chart',
            'options': {
                'chartArea': {'height': '80%', 'width': '90%'},
                'hAxis': {
                    'gridlines': {
                        'units': {
                            'format': ['hh:mm aa']
                        }
                    }
                },
                'legend': {'position': 'none'}
            }
        });


        var data = new google.visualization.DataTable();
        data.addColumn('datetime', 'Date');
        data.addColumn('number', 'Observed Reflectivity');
        data.addColumn('number', 'Forecasted Reflectivity');
        
        for (i = 0; i < formattedObservedData.length; i++) { 
            data.addRow([new Date(formattedObservedData[i][0]),
dbzToIntensityBucket(formattedObservedData[i][1]),null]);
        }
        
        for (i = 0; i < formattedForecastedData.length; i++) { 
            data.addRow([new Date(formattedForecastedData[i][0]),null,
dbzToIntensityBucket(formattedForecastedData[i][1])]);
        }
        
        dashboard.bind(control, chart);
        dashboard.draw(data);
        

-- 
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/7c8ac291-47d8-4b38-a7f3-cdd752f515da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to