or
Dim
lineMonthlyProfits
As
New
LineSeries
Dim
lineTotalProfits
As
New
LineSeries
Dim
yAxisTotalProfits
As
New
AxisY
Do
While
ChartingMonth < Now()
GrossProfit = 0 : Fees = 0
'Code here that pulls values from db
TotalProfit += GrossProfit - Fees
lineMonthlyProfits.SeriesItems.Add(
CInt
(GrossProfit - Fees))
lineTotalProfits.SeriesItems.Add(Int(TotalProfit))
chartMonthlyProfits.PlotArea.XAxis.Items.Add(
CStr
(Month(ChartingMonth)) &
"/"
& Right(
CStr
(Year(ChartingMonth)), 2))
ChartingMonth = DateAdd(DateInterval.Month, 1, ChartingMonth)
Loop
lineMonthlyProfits.Name =
"Monthly Profit"
lineMonthlyProfits.LabelsAppearance.DataFormatString =
"{0:c0}"
lineTotalProfits.LabelsAppearance.DataFormatString =
"{0:c0}"
chartMonthlyProfits.PlotArea.Series.Add(lineMonthlyProfits)
chartMonthlyProfits.PlotArea.YAxis.MaxValue = 20000
'Not needed but in place for testing purposes
yAxisTotalProfits.Name =
"Total Profits"
chartMonthlyProfits.PlotArea.AdditionalYAxes.Add(yAxisTotalProfits)
chartMonthlyProfits.PlotArea.XAxis.AxisCrossingPoints.Add(0)
chartMonthlyProfits.PlotArea.XAxis.AxisCrossingPoints.Add(lineTotalProfits.SeriesItems.Count)
lineTotalProfits.Name = yAxisTotalProfits.Name
chartMonthlyProfits.PlotArea.Series.Add(lineTotalProfits)
chartMonthlyProfits.PlotArea.YAxis.LabelsAppearance.DataFormatString =
"{0:c0}"
chartMonthlyProfits.PlotArea.YAxis.MinorGridLines.Visible =
False
chartMonthlyProfits.PlotArea.XAxis.MinorGridLines.Visible =
False
chartMonthlyProfits.PlotArea.XAxis.MajorGridLines.Visible =
False
chartMonthlyProfits.Legend.Appearance.Visible =
False
function GetRadWindow() { |
var oWindow = null; |
if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog |
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz az well) |
return oWindow; |
} |
function CloseOnReload() { |
GetRadWindow().Close(); |
} |
Is there any way to stop the postback when the user clicks the Cancel button or the 'X'?
Thanks.
Steve