Outils pour utilisateurs

Outils du site


devweb:highcharts (lu 25463 fois)

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
Prochaine révision Les deux révisions suivantes
devweb:highcharts [22-01-2015 10:12]
edmc73 [Exporter soi-même]
devweb:highcharts [28-04-2015 10:30]
edmc73
Ligne 46: Ligne 46:
   * highcharts-more.js   * highcharts-more.js
   * data.js   * data.js
 +
 +===== Graphique avec une ligne pleine et pointillée mélangée =====
 +
 +<code javascript>
 +$(function () {
 +    var chart;
 +    $(document).ready(function() {
 +        chart = new Highcharts.Chart({
 +            chart: {
 +                renderTo: 'container',
 +                type: 'line',
 +                marginRight: 130,
 +                marginBottom: 25
 +            },
 +            title: {
 +                text: 'Monthly Average Temperature',
 +                x: -20 //center
 +            },
 +            subtitle: {
 +                text: 'Source: WorldClimate.com',
 +                x: -20
 +            },
 +            xAxis: {
 +                categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
 +                    'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
 +            },
 +            yAxis: {
 +                title: {
 +                    text: 'Temperature (°C)'
 +                },
 +                plotLines: [{
 +                    value: 0,
 +                    width: 1,
 +                    color: '#808080'
 +                }]
 +            },
 +            tooltip: {
 +                formatter: function() {
 +                        return '<b>'+ this.series.name +'</b><br/>'+
 +                        this.x +': '+ this.y +'°C';
 +                }
 +            },
 +            legend: {
 +                layout: 'vertical',
 +                align: 'right',
 +                verticalAlign: 'top',
 +                x: -10,
 +                y: 100,
 +                borderWidth: 0
 +            },
 +            series: [{
 +                name: 'Tokyo',
 +                data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5,null,24.8,24.1,20.1]
 +            }, {
 +                name: 'New York',
 +                data: [{x: 5, y: 21.5}, {x: 6, y: 22.0},{x: 7, y: 24.8}, {x: 8, y: null}, {x: 9, y: 20.1}, {x:10, y: 14.1}, {x:11, y: 13}],
 +                dashStyle: 'dash'
 +            }]
 +        });
 +    });
 +    
 +});
 +</code>
 +exemple => http://jsfiddle.net/mkremer90/zMZEV/1/
devweb/highcharts.txt · Dernière modification: 04-09-2018 11:23 de edmc73