Thank you! Are you an expert on the animations column charts in the google apis? I'm now trying to get the column chart (there are 12 columns that I want to shrink to 'zero' when I click on the button) to shrink using a constant velocity to zero for all 12 column charts.. I'm so new to this and I'm a deer in a dark place.. Any suggestions would be appreciated! Thanks, Victor! PS: if you want my code and html page let me know..
On Mon, Nov 23, 2020 at 3:38 AM vivek krishna <[email protected]> wrote: > "The Piechart created using the below code displays duplicate values > randomly, on refreshing the chart gets corrected." > Want to understand the problem and solution thereof... > > Code :- > <script type="text/javascript" src=" > https://www.gstatic.com/charts/loader.js"></script> > <script type="text/javascript" src="https://www.google.com/jsapi > "></script> > <script src=" > https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js > "></script> > > $.ajax({ > > type: "POST", > dataType: "json", > contentType: "application/json", > url: '@Url.Action("VisualizeBookingStatus", "View")', > success: function (result) { > > // Load the Visualization API and the corechart package. > google.charts.load('current', { 'packages': ['corechart'] }); > > // Set a callback to run when the Google Visualization API is loaded. > google.charts.setOnLoadCallback(function () { > drawChart(result); > }); > > } > > }); > > }); > > function drawChart(result) { > > var data = new google.visualization.DataTable(); > > data.addColumn('string', 'Agency'); > data.addColumn('number', 'Booked'); > > var dataArray = []; > > > $.each(result, function (i, obj) { > dataArray.push([obj.agency, obj.booking_count]); > > }); > > > data.addRows(dataArray); > > var chartoptions = { > 'title': 'Booking-Agencywise', > chartArea: { width: 500, height: 400 }, > is3D: true > }; > > var chart = new > google.visualization.PieChart(document.getElementById('piechart')); > chart.draw(data, chartoptions); > > } > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-visualization-api/d4065ada-4f58-4343-bf39-8e40efff0432n%40googlegroups.com > <https://groups.google.com/d/msgid/google-visualization-api/d4065ada-4f58-4343-bf39-8e40efff0432n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/CAJAzQQsiuVP4Onm8eugUXsNjKk%2BzEDbznnvCK08FDe3Mou%2B6Bg%40mail.gmail.com.
