1

I use Google Charts API, not Maps. I have this function. I want to make marker animated, so I want to change the default circle to gif image. How should I do it? Is it possible?

google.charts.load('current', {
  callback: function () {
    var chart = new window.google.visualization.GeoChart(document.getElementById('chart_div'));
    var options = {
        displayMode: 'markers',
        sizeAxis: {
            minSize: 3
        },
        backgroundColor: {
            fill: '#303030'
        },
        colorAxis: {
            colors: ['#FBFE72', '#FEB86B', '#EE683C']
        },
        legend: 'none',
        region: 'US',
        datalessRegionColor: '#289499'
    };
    var data;
    data = new window.google.visualization.DataTable();
    data.addColumn('number', 'Lat');
    data.addColumn('number', 'Long');
    data.addColumn('string', 'Name');
    data.addColumn('number', 'Count');
    data.addRows(1);
    data.setValue(0, 0, -120);
    data.setValue(0, 1, 2);
    data.setValue(0, 2, 'Test');
    data.setValue(0, 3, 1);

    chart.draw(data, options);
  },
  packages:['geochart']
});
<script src="https://www.gstatic.com/charts/loader.js"></script>
<script src="https://www.google.com/jsapi"></script>
<div id="chart_div"></div>
WhiteHat
  • 59,912
  • 7
  • 51
  • 133
whoiskatrin
  • 73
  • 2
  • 12
  • Possible duplicate of [Can I use my own custom animated gifs as markers on Google Maps API?](http://stackoverflow.com/questions/23259084/can-i-use-my-own-custom-animated-gifs-as-markers-on-google-maps-api) – Fabian Schultz Oct 13 '16 at 15:22
  • @FabianSchultz it's related to the Google Maps API. I need a solution for Google Charts API. – whoiskatrin Oct 13 '16 at 15:26
  • Could you please give us a working example on JSFiddle or similar? – Fabian Schultz Oct 13 '16 at 15:38

0 Answers0