title: Drupal google chart api Y axis values help needed
body: <p>I am using <a href="https://www.drupal.org/project/chart" rel="nofollow">chart</a>, a drupal module using <a href="https://developers.google.com/chart/image/" rel="nofollow">google chart tools</a>.</p>
  
  <p>I have created the graph successfully but my problem is that I want to put integer values in the Y axis. I am making a graph of total number of votes. So let's suppose I have a poll with 55 votes (total nummer). The Y axis range should be till the max value property. Like if we have A, B and C then A has 25 votes, B has 10 votes and C has 20 votes. So the Y axis range should be equal to 25 with no float values like 1.5 or 2.5 between them. Here is the code of my function:</p>
  
  <pre><code>//theme the poll results block
  
    $html = $variables['results'];
    $pattern = "@class=\"text\"\&gt;(.*)\&lt;/div\&gt;@";
    preg_match_all($pattern, $html, $choices); //extract choices
    $pattern = "@style=\"width: (.*)%;\"@";
    preg_match_all($pattern, $html, $votes); //extract percentages
    $chart = array(
        '#chart_id' =&gt; 'poll_chart' . $variables[nid],
        '#type' =&gt; CHART_TYPE_BAR_V,
        '#size' =&gt; chart_size(600, 350),
        '#grid_lines' =&gt; chart_grid_lines(100,10 ),
        '#bar_size' =&gt; chart_bar_size(30, 50),
    );
  
  // NEED TO FILL IN DATA TO MAKE CHART
    for ($c=0; $c &lt; count($choices[1]); $c++) { //make labels and values
       $chart['#data_colors'][] = 'ff8e07';
       $chart['#data'][$choices[1][$c]] = $votes[1][$c]; //number of votes
       $chart['#legends'][] = $choices[1][$c] . " (" . $votes[1][$c] . "%)"; // labels
       $chart['#mixed_axis_labels'][CHART_AXIS_X_BOTTOM][0][] = chart_mixed_axis_label(t($choices[1][$c]))
       ;
       print $choice['chvotes'];
    }
  
    $chart['#mixed_axis_labels'][CHART_AXIS_X_BOTTOM][2][] = chart_mixed_axis_label(t('Choices'), 50);
    $chart['#mixed_axis_labels'][CHART_AXIS_Y_LEFT][3][] = chart_mixed_axis_label(t('Votes'), 95);
    $chart['#mixed_axis_labels'][CHART_AXIS_Y_LEFT][4][] = chart_mixed_axis_range_label(0, $variables['votes']);
  
    $variables['results'] = chart_render($chart); //render graph
  </code></pre>