What I am trying to do is integrate the chart with Salesforce.  I currently 
have the chart into salesforce,  how ever it only shows the chart if all 
values are filled in.  I would like to still be able to see the chart on my 
page if some of the fields are not filled in.   In the highlighted area. 
 you see  ['Jan', {! Market_Share__c.January__c} ], you see 
Market_Share__c.January__c.  January__c is the field name.  If I don't have 
any value added to that field the cart doesn't display on my page.  I 
really need it to show up on the page even if there isn't any value there. 
 There may be other values on Feb and March.  Any thing that I can do to 
make this work.  Thanks 

<html>
  <head>
  <center>
  <h1><center><font size="3"></font></center></h1>
  
    <script type="text/javascript"
          src="https://www.google.com/jsapi?autoload={
            'modules':[{
              'name':'visualization',
              'version':'1',
              'packages':['corechart']
            }]
          }"></script>

    <script type="text/javascript">
      google.setOnLoadCallback(drawChart);

      function drawChart() {
        var data = google.visualization.arrayToDataTable([
      ['Month', 'Shares',],
      ['Jan', {! Market_Share__c.January__c} ],
      ['Feb', {! Market_Share__c.February__c} ],
      ['Mar', {! Market_Share__c.March__c }  ],
      ['Apr', {! Market_Share__c.April__c } ],
      ['May', {! Market_Share__c.May__c } ],
      ['Jun', {! Market_Share__c.June__c } ],
      ['Jul', {! Market_Share__c.July__c } ],
      ['Aug', {! Market_Share__c.August__c } ],
      ['Sep', {! Market_Share__c.September__c } ],
      ['Oct', {! Market_Share__c.October__c } ],
      ['Nov', {! Market_Share__c.November__c} ],
      ['Dec', {! Market_Share__c.December__c} ],

        ]);

        var options = {
          title: '',
          curveType: 'function',
          legend: { position: 'bottom' }
        };

        var chart = new 
google.visualization.LineChart(document.getElementById('curve_chart'));

        chart.draw(data, options);
      }
    </script>
    </center>
  </head>
  <body>
  <center>
    <div id="curve_chart" style="width: 950px; height: 300px"></div>
    </center>
  </body>
</html>

-- 
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-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to