zoukankan      html  css  js  c++  java
  • AE中,用ZedGraph控件画柱状图、饼状图


    Private
    Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click CreateGraph_GradientByZBars(XXXXXXXX) '折线图 End Sub Private Sub CreateGraph_GradientByZBars(ByVal z1 As ZedGraphControl) Dim myPane As GraphPane = z1.GraphPane myPane.Title.Text = "Demonstration of Multi-Colored Bars with a Single BarItem" myPane.XAxis.Title.Text = "Bar Number" myPane.YAxis.Title.Text = "Value" Dim list As New PointPairList() Dim rand As New Random() Dim i As Integer For i = 0 To 15 Dim x As Double = CDbl(i) + 1 Dim y As Double = rand.NextDouble() * 1000 Dim z As Double = i / 4.0 list.Add(x, y, z) Next i Dim myCurve As BarItem = myPane.AddBar("Multi-Colored Bars", list, Color.Blue) Dim colors As Color() = {Color.Red, Color.Yellow, Color.Green, Color.Blue, Color.Purple} myCurve.Bar.Fill = New Fill(colors) myCurve.Bar.Fill.Type = FillType.GradientByZ myCurve.Bar.Fill.RangeMin = 0 myCurve.Bar.Fill.RangeMax = 4 myPane.Chart.Fill = New Fill(Color.White, Color.FromArgb(220, 220, 255), 45) myPane.Fill = New Fill(Color.White, Color.FromArgb(255, 255, 225), 45) ' Tell ZedGraph to calculate the axis ranges z1.AxisChange() End Sub 'CreateGraph_GradientByZBars
  • 相关阅读:
    NOIP2016 蚯蚓 题解
    BZOJ 1294 围豆豆 题解
    POJ1852 Ants 题解
    BZOJ 1131 [POI2008] STA-Station 题解
    HDU 5963 朋友 题解
    Codeforces 1292C Xenon's Attack on the Gangs 题解
    Emergency Evacuation 题解
    P4408 逃学的小孩 题解
    UVA11300 Spreading the Wealth 题解
    P2882 Face The Right Way G 题解
  • 原文地址:https://www.cnblogs.com/beileierhao/p/2490719.html
Copyright © 2011-2022 走看看