sain Posted March 4, 2009 Report Posted March 4, 2009 Hi everybody,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> IChartFXWPFTest13.zip Quote
sain Posted March 4, 2009 Author Report Posted March 4, 2009 I'm here with sending my source again: Source Code for the above graphs Public Class Sales Private _PrdouctName As String Private _Sales As Integer Public Property ProductName() As String GetReturn _PrdouctName End GetSet(ByVal value As String) _PrdouctName = value End Set End Property Public Property Sales() As Integer GetReturn _Sales End GetSet(ByVal value As Integer) _Sales = value End Set End PropertyPublic Sub New() End SubPublic Sub New(ByVal name As String, ByVal sales As Integer) Me._PrdouctName = nameMe._Sales = sales End Sub End Class WebPage with button click events: Partial Public Class _Default Inherits System.Web.UI.PageProtected Sub btnSample1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSample1.Click Dim prodsaleslist As New List(Of Sales)prodsaleslist.Add(New Sales("Sony", 10)) prodsaleslist.Add( New Sales("Panasonic", 30))prodsaleslist.Add(New Sales("Vizio", 55)) prodsaleslist.Add( New Sales("Toshiba", 70))Me.Chart1.DataSource = prodsaleslist SetChartCommonProperties(Chart1)Chart1.Titles.Add(CreateTitle("TV Sales in 2008-2009")) End SubProtected Sub btnSample2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSample2.Click Dim prodsaleslist As New List(Of Sales)prodsaleslist.Add(New Sales("Honda", 120)) prodsaleslist.Add( New Sales("Accord", 335))prodsaleslist.Add(New Sales("BMW", 459)) prodsaleslist.Add( New Sales("Ford", 198))Me.Chart1.DataSource = prodsaleslist SetChartCommonProperties(Chart1)Chart1.Titles.Add(CreateTitle("Car Sales Sales in 2008-2009")) End SubProtected Sub btnSample3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSample3.Click Dim prodsaleslist As New List(Of Sales)prodsaleslist.Add(New Sales("Shell", 1234)) prodsaleslist.Add( New Sales("British Petrolium", 3452))prodsaleslist.Add(New Sales("Exxon Mobile", 2352)) prodsaleslist.Add( New Sales("Texaco", 65432))Me.Chart1.DataSource = prodsaleslist SetChartCommonProperties(Chart1)Chart1.Titles.Add(CreateTitle("Gas Sales in 2008-2009")) End SubPrivate Sub SetChartCommonProperties(ByVal chrt As ChartFX.WebForms.Chart) Chart1.Height = 500 chrt.AxisY.LabelsFormat.Decimals = 1 chrt.AxisY.DataFormat.Decimals = 1 chrt.AxisY.LabelsFormat.Format = ChartFX.WebForms.AxisFormat.Percentage chrt.AxisY.DataFormat.Format = ChartFX.WebForms.AxisFormat.Percentage chrt.AxisY.ScaleUnit = 100 chrt.AxisY.Step = 10 chrt.AxisX.Grids.Major.Visible = False End SubPrivate Function CreateTitle(ByVal title As String) As ChartFX.WebForms.TitleDockableDim newTitle As New ChartFX.WebForms.TitleDockable newTitle.Text = title newTitle.Font = New System.Drawing.Font(newTitle.Font, Drawing.FontStyle.Bold)Return newTitle End Function End Class Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.