コード例 #1
0
        public static BrowserShareChartData GetBrowserShares()
        {
            var chartData = new BrowserShareChartData()
            {
                Title = "Browser usage on Wikipedia October 2011",
                Width = 450,
                Height = 300,
                ShareData = new List<BrowserInformation>()
            };

            // The following data is the true data from Wikipedia
            chartData.ShareData.Add(new BrowserInformation()
            {
                Name = "IE",
                Share = 0.342,
                Url = "http://en.wikipedia.org/wiki/Internet_Explorer"
            });

            chartData.ShareData.Add(new BrowserInformation()
            {
                Name = "Firefox",
                Share = 0.236,
                Url = "http://en.wikipedia.org/wiki/Firefox"
            });

            chartData.ShareData.Add(new BrowserInformation()
            {
                Name = "Chrome",
                Share = 0.206,
                Url = "http://en.wikipedia.org/wiki/Google_Chrome"
            });

            chartData.ShareData.Add(new BrowserInformation()
            {
                Name = "Safari",
                Share = 0.112,
                Url = "http://en.wikipedia.org/wiki/Safari_(web_browser)"
            });

            chartData.ShareData.Add(new BrowserInformation()
            {
                Name = "Other",
                Share = 0.104,
                Url = null
            });

            return chartData;
        }
コード例 #2
0
 public BrowserShareChart(BrowserShareChartData chartData)
 {
     this.chartData = chartData;
 }