Hello! How can I make the vAxis go from 10 to 0? 

As you can see, it was not enough what I did here.

// Callback that draws the pie chart for No Hedge Fund's chart.
function draw0hedgeChart() {
  var data = new google.visualization.DataTable();
  data.addColumn('number', 'X');
  data.addColumn('number', 'Y');

    //here we enter the data
   [ 9.87,      6.53],

    //variables such as title, axis, width and height of the scatterplot
    var options = {
        colors: ['#000000'],
        legend: 'none',
          title: 'Risk vs. Return with 0% Hedge Fund',
          hAxis: {title: 'Risk', minValue: 7, maxValue: 10, gridlineColor: 
          vAxis: {title: 'Return', minValue: 10, maxValue: 0, 
gridlineColor: '#fff'},    /////////////////////////////////// Here is 
wherewant to make the axis navigate from the value 10, going to 0

  var container = document.getElementById('chart0_div'); //here we define 
the id of the element. This name is what we must use in a div to make the 
chart appear
  var chart = new google.visualization.ScatterChart(container);

  google.visualization.events.addListener(chart, 'ready', function () {
    var layout = chart.getChartLayoutInterface();
    for (var i = 0; i < data.getNumberOfRows(); i++) {
        var xPos = layout.getXLocation(data.getValue(i, 0));
        var yPos = layout.getYLocation(data.getValue(i, 1));

        var widget0 = container.appendChild(document.createElement('img'));
        widget0.src = 'img/0.png';
        widget0.className = 'chart0';

        // (overlay the dot)
        widget0.style.top = (yPos - 50) + 'px';
        widget0.style.left = (xPos - 50) + 'px';

  chart.draw(data, options);

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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to