Re: Unable to get value of the property 'color': object is null or undefined while using "Core Chart" package

87 views
Skip to first unread message

asgallant

unread,
Sep 25, 2012, 10:19:57 AM9/25/12
to google-visua...@googlegroups.com
Can you provide a sample of jsondata and a sample of the code after it is rendered by the server?  I can't help much without it, except to say that many of the options you use changed for the new charts (see the LineChart documentation).

On Tuesday, September 25, 2012 2:00:55 AM UTC-4, Sushumna Mulugu wrote:
Hi All,

I have changed my code as below using the Core Charts package to make visualizations work in IE 9 .


    <apex:outputPanel id="chart_div">
        <script type="text/javascript" src="https://www.google.com/jsapi"></script>
        <script type="text/javascript">
            google.load("visualization", "1", {packages: ["corechart"]});
            google.setOnLoadCallback(drawLineChart);
 
            function drawLineChart() {
                var data = new google.visualization.DataTable( eval( '({!jsondata})' ) );
 
                var chart = new google.visualization.LineChart(
                document.getElementById('{!$Component.chart_div}'));
                chart.draw(data, {width: {!width}, height: {!height},
                                  axisColor: '{!axisColor}',
                                  axisBackgroundColor: '{!axisBackgroundColor}',
                                  backgroundColor: '{!backgroundColor}',
                                  borderColor: '{!borderColor}',
                                  enableTooltip: {!enableTooltip},
                                  focusBorderColor: '{!focusBorderColor}',
                                  legend: '{!legend}',
                                  legendBackgroundColor: '{!legendBackgroundColor}',
                                  legendTextColor: '{!legendTextColor}',
                                  lineSize: {!lineSize},
                                  pointSize: {!pointSize},
                                  reverseAxis: {!reverseAxis},
                                  showCategories: {!showCategories},
                                  smoothLine: {!smoothLine},
                                  title: '{!title}',

                                  titleX: '{!titleX}',
                                  titleY: '{!titleY}',
                                  titleColor: '{!titleColor}'});
            }
        </script>
    </apex:outputPanel>


But my charts have gone invisible on IE9, Mozilla Firefox (previously working). Chrome (previously working).

Previously the packages were "linechart" "columnchart" specifically.

Please help me resolve the same, its a critical requirement.

Warm Regards,
Sushupsi
Reply all
Reply to author
Forward
0 new messages