3D Pie auf Main gesetzt
This commit is contained in:
@@ -13,6 +13,7 @@ Public MustInherit Class BaseController
|
||||
Public HistoryModel As HistoryModel
|
||||
Public UserModel As UserModel
|
||||
Public EmailModel As EmailModel
|
||||
Public ChartModel As ChartModel
|
||||
|
||||
Public ActionService As ActionService
|
||||
|
||||
@@ -35,6 +36,7 @@ Public MustInherit Class BaseController
|
||||
HistoryModel = New HistoryModel(pState)
|
||||
UserModel = New UserModel(pState)
|
||||
EmailModel = New EmailModel(pState)
|
||||
ChartModel = New ChartModel(pState)
|
||||
End Sub
|
||||
|
||||
Public Function DeleteEnvelope(pEnvelope As Envelope) As Boolean
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports EnvelopeGenerator.Common
|
||||
Imports DevExpress.XtraCharts
|
||||
Imports EnvelopeGenerator.Common
|
||||
|
||||
Public Class EnvelopeListController
|
||||
Inherits BaseController
|
||||
@@ -18,4 +19,35 @@ Public Class EnvelopeListController
|
||||
Return MyBase.DeleteEnvelope(pEnvelope)
|
||||
End Function
|
||||
|
||||
Public Function GetPieChart() As ChartControl
|
||||
Dim oChartControl As ChartControl = New ChartControl With {
|
||||
.Name = "ChartControl1",
|
||||
.Dock = DockStyle.Fill
|
||||
}
|
||||
|
||||
Dim oSerie As Series = New Series("PIE Title", ViewType.Pie3D) With {
|
||||
.LegendTextPattern = "{A}"
|
||||
}
|
||||
|
||||
Dim pieLabel As PieSeriesLabel = TryCast(oSerie.Label, PieSeriesLabel)
|
||||
If pieLabel IsNot Nothing Then
|
||||
pieLabel.Position = PieSeriesLabelPosition.Outside
|
||||
End If
|
||||
|
||||
Dim xAxisTitle As String = "Argument"
|
||||
Dim yAxisTitle As String = "Value"
|
||||
|
||||
Dim oTable As DataTable = ChartModel.LoadPIEExample()
|
||||
|
||||
For Each oRow In oTable.Rows
|
||||
Dim value1 As String = CStr(oRow.Item(xAxisTitle))
|
||||
Dim value2 As String = CStr(oRow.Item(yAxisTitle))
|
||||
oSerie.Points.Add(New SeriesPoint(value1, value2))
|
||||
Next
|
||||
|
||||
oSerie.ArgumentScaleType = ScaleType.Qualitative
|
||||
oChartControl.Series.Add(oSerie)
|
||||
|
||||
Return oChartControl
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user