source: sipes/libraries/Highcharts-4.0.4/examples/pie-gradient/index.htm @ 307d09d

stableversion-3.0
Last change on this file since 307d09d was 307d09d, checked in by José Gregorio Puentes <jpuentes@…>, 8 años ago

se agregaron las librerias

  • Propiedad mode establecida a 100644
File size: 2.3 KB
Línea 
1<!DOCTYPE HTML>
2<html>
3        <head>
4                <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5                <title>Highcharts Example</title>
6
7                <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
8                <style type="text/css">
9${demo.css}
10                </style>
11                <script type="text/javascript">
12$(function () {
13
14    // Radialize the colors
15    Highcharts.getOptions().colors = Highcharts.map(Highcharts.getOptions().colors, function (color) {
16        return {
17            radialGradient: { cx: 0.5, cy: 0.3, r: 0.7 },
18            stops: [
19                [0, color],
20                [1, Highcharts.Color(color).brighten(-0.3).get('rgb')] // darken
21            ]
22        };
23    });
24
25    // Build the chart
26    $('#container').highcharts({
27        chart: {
28            plotBackgroundColor: null,
29            plotBorderWidth: null,
30            plotShadow: false
31        },
32        title: {
33            text: 'Browser market shares at a specific website, 2014'
34        },
35        tooltip: {
36            pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
37        },
38        plotOptions: {
39            pie: {
40                allowPointSelect: true,
41                cursor: 'pointer',
42                dataLabels: {
43                    enabled: true,
44                    format: '<b>{point.name}</b>: {point.percentage:.1f} %',
45                    style: {
46                        color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
47                    },
48                    connectorColor: 'silver'
49                }
50            }
51        },
52        series: [{
53            type: 'pie',
54            name: 'Browser share',
55            data: [
56                ['Firefox',   45.0],
57                ['IE',       26.8],
58                {
59                    name: 'Chrome',
60                    y: 12.8,
61                    sliced: true,
62                    selected: true
63                },
64                ['Safari',    8.5],
65                ['Opera',     6.2],
66                ['Others',   0.7]
67            ]
68        }]
69    });
70});
71
72
73                </script>
74        </head>
75        <body>
76<script src="../../js/highcharts.js"></script>
77<script src="../../js/modules/exporting.js"></script>
78
79<div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>
80
81        </body>
82</html>
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.