I
I
iamsaint2012-12-04 12:03:34
JavaScript
iamsaint, 2012-12-04 12:03:34

Hichcharts daily and hourly chart in one chart?

Good afternoon, please tell me how to correctly combine data by day and by hour in one chart
Below is an example of how I do it, but the output is the
download?id=UASZUGPd2xDQGWmNpJSWG7l3a

following
download?id=Vh3YzrOjqlPpPuoeRud0xJ7oU
:

(function($){ // encapsulate jQuery<br>
<br>
            $(function () {<br>
                var chart;<br>
                $(document).ready(function() {<br>
                    chart = new Highcharts.Chart({<br>
                        chart: {<br>
                            renderTo: 'container',<br>
                            zoomType: 'xy'<br>
                        },<br>
                        title: {<br>
                            text: 'Chart'<br>
                        },<br>
<br>
                        xAxis: [{<br>
                            categories: ["02.12","03.12"]<br>
                        }],<br>
                        yAxis: [, {<br>
                            gridLineWidth: 0,<br>
                            title: {<br>
                                text: '',<br>
                                style: {<br>
                                    color: '#4572A7'<br>
                                }<br>
                            }<br>
<br>
                        }, {<br>
                            gridLineWidth: 0,title: {<br>
                                text: '',<br>
                                style: {<br>
                                    color: '#4572A7'<br>
                                }<br>
                            }<br>
                        }],<br>
<br>
                        legend: {<br>
                            layout: 'vertical',<br>
                            align: 'left',<br>
                            x: 120,<br>
                            verticalAlign: 'top',<br>
                            y: 80,<br>
                            floating: true,<br>
                            backgroundColor: '#FFFFFF'<br>
                        },<br>
                        series: [{<br>
                            name: 'Статистика по дням',<br>
                            color: '#4572A7',<br>
                            type: 'column',<br>
                            yAxis: 1,<br>
                            data: [588,1196]<br>
<br>
                        }, {<br>
                            name: 'Статистика по часам',<br>
                            color: '#AA4643',<br>
                            type: 'spline',<br>
                            yAxis: 2,<br>
                            data: [6,28,15,14,17,2,17,13,4,4,7,34,17,29,9,60,49,33,9,24,35,89,28,45,13,46,30,39,23,29,2,15,5,22,70,80,72,130,111,53,95,75,26,58,62,55,6,79]<br>
                        }]<br>
                    });<br>
                });<br>
<br>
            });<br>
        })(jQuery);<br>
<br>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question