Hello.

I've got a problem with Line Chart.

On this page http://www.metrtv.ru/price_dynamics we have charts of changing 
price on real estate (hAxis - date, vAxis - price). This values are taken 
by jquery ajax from pre-generated json files (one file for one chart).

On windows machines in webkit-based browsers (Chrome, Yandex browser) I see 
2013 two times (see the screenshot). In Firefox and Explorer they looks 
well as well as Chrome on Linux. How could I fix this issue?

<https://lh5.googleusercontent.com/-jdipwuI4n8w/VC6kcPMidCI/AAAAAAAAALI/GNdiLIcuQYM/s1600/dyn.jpg>



Js-code for charts:

google.load('visualization', '1.0', {'packages':['corechart']});
    google.setOnLoadCallback(function(){

    $charts = $('.b-charts__item__chart');
    if ($charts.size()) {

        $charts.each(function(){
        var $el = this;
        $.ajax({
            url: $($el).attr('rel') + '?' + (Math.floor(Math.random() * 
(9999 - 1000 + 1)) + 1000),
            data: '',
            success: function(jsonData){
                var $chartData = [];
                $.each(jsonData, function(i, row){
                    $chartData.push([new Date(row[0]), row[1]]);
                });
                var data = new google.visualization.DataTable();
                data.addColumn('date', 'Дата'); // Date
                data.addColumn('number', 'Средняя цена'); // Average price
                data.addRows($chartData);
                var options = {
                    'height':240,
                    'chartArea':{left:70,top:20,width:"80%",height:"200"},
                    'legend':'none'
                };
                var chart = new google.visualization.LineChart($el);
                chart.draw(data, options);
            },
            dataType: 'json'
        });

    });
    }

    });

Thanks for your attention.

-- 
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 post to this group, send email to [email protected].
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