zoukankan      html  css  js  c++  java
  • LiveCharts文档-4基本绘图-2基本柱形图

    4基本绘图-2基本柱形图

    using System.Windows.Forms;
    using LiveCharts;
    using LiveCharts.Wpf;
    namespace Winforms.Cartesian.BasicBar
    {
        public partial class BasicColumnExample : Form
        {
            public BasicColumnExample()
            {
                InitializeComponent();
                cartesianChart1.Series = new SeriesCollection
                {
                    new ColumnSeries
                    {
                        Title = "2015",
                        Values = new ChartValues<double> { 10, 50, 39, 50 }
                    }
                };
                //adding series will update and animate the chart automatically
                cartesianChart1.Series.Add(new ColumnSeries
                {
                    Title = "2016",
                    Values = new ChartValues<double> { 11, 56, 42 }
                });
                //also adding values updates and animates the chart automatically
                cartesianChart1.Series[1].Values.Add(48d);
                cartesianChart1.AxisX.Add(new Axis
                {
                    Title = "Sales Man",
                    Labels = new[] {"Maria", "Susan", "Charles", "Frida"}
                });
                cartesianChart1.AxisY.Add(new Axis
                {
                    Title = "Sold Apps",
                    LabelFormatter = value => value.ToString("N")
                });
            }
        }
    }
    
  • 相关阅读:
    Python之数学(math)和随机数(random)
    《图解HTTP》读书笔记
    leetcode1008
    leetcode1007
    leetcode1006
    leetcode1005
    leetcode218
    leetcode212
    leetcode149
    leetcode140
  • 原文地址:https://www.cnblogs.com/newlifechou/p/8889115.html
Copyright © 2011-2022 走看看