摘要:ASP.NET 繪出統計圖表 - ZedGraph Win / Web - III - Parser Error
天阿~怎麼會有 Parser Error 的問題阿?我明明都按照之前的步驟作哩,而且在另外一個專案也有成功的執行起來,怎麼這個專案怎麼試都說 Parser Error 呢? Dim myPane As GraphPane = masterPane(0)
到 code-behind 去看居然連 RenderGraph 事件都看不到
' Set the title and axis labels
myPane.Title.Text = "Cat Stats"
myPane.YAxis.Title.Text = "Big Cats"
myPane.XAxis.Title.Text = "Population"
' Make up some data points
Dim labels() As String = {"Panther", "Lion", "Cheetah", "Cougar", "Tiger", "Leopard"}
Dim x() As Double = {100, 115, 75, 22, 98, 40}
Dim x2() As Double = {120, 175, 95, 57, 113, 110}
Dim x3() As Double = {204, 192, 119, 80, 134, 156}
' Generate a red bar with "Curve 1" in the legend
Dim myCurve As BarItem = myPane.AddBar("Here", x, Nothing, Color.Red)
' Fill the bar with a red-white-red color gradient for a 3d look
myCurve.Bar.Fill = New Fill(Color.Red, Color.White, Color.Red, 90.0F)
' Generate a blue bar with "Curve 2" in the legend
myCurve = myPane.AddBar("There", x2, Nothing, Color.Blue)
' Fill the bar with a Blue-white-Blue color gradient for a 3d look
myCurve.Bar.Fill = New Fill(Color.Blue, Color.White, Color.Blue, 90.0F)
' Generate a green bar with "Curve 3" in the legend
myCurve = myPane.AddBar("Elsewhere", x3, Nothing, Color.Green)
' Fill the bar with a Green-white-Green color gradient for a 3d look
myCurve.Bar.Fill = New Fill(Color.Green, Color.White, Color.Green, 90.0F)
' Draw the Y tics between the labels instead of at the labels
myPane.YAxis.MajorTic.IsBetweenLabels = True
' Set the YAxis labels
myPane.YAxis.Scale.TextLabels = labels
' Set the YAxis to Text type
myPane.YAxis.Type = AxisType.Text
' Set the bar type to stack, which stacks the bars by automatically accumulating the values
myPane.BarSettings.Type = BarType.Stack
' Make the bars horizontal by setting the BarBase to "Y"
myPane.BarSettings.Base = BarBase.Y
' Fill the axis background with a color gradient
myPane.Chart.Fill = New Fill(Color.White, Color.FromArgb(255, 255, 166), 45.0F)
masterPane.AxisChange(g)