Jump to content
Software FX Community

Exception painting the chart


User (Legacy)

Recommended Posts

I get a ArgumentOutOfRangeException exception drawing the chart. I'm using a

Gantt chart with about 800 rows of 36 points. See call stack at end

I'll tell you what I can now, but I suspect we will need to take an

iterative approach to identify the problem.

The exception does not occur for smaller datasets or if axis labels/captions

are not set in code (chart1.AxisX.Label(nRow))

Essentially the code I'm using is:

chart1.ClearData(ClearDataFlag.Data)

chart1.Scrollable = False

chart1.Gallery = Gallery.Gantt

chart1.Stacked = Stacked.No

chart1.Cluster = True

chart1.MultipleColors = False

chart1.AxisY.LabelsFormat.Format = AxisFormat.Time

chart1.AxisY.AutoScale = True

chart1.AxisX.Staggered = True

Dim codFlagsValues As COD = COD.Values Or COD.AllocHidden Or COD.Remove

Dim codFlagsIniValues As COD = COD.IniValues Or COD.AllocHidden Or

COD.Remove

chart1.OpenData(codFlagsValues, nPointsPerSeries, nSeries)

chart1.OpenData(codFlagsIniValues, nPointsPerSeries, nSeries)

for each task (nCol)

bSetCaption = fasle

for each subtask (nRow)

if not bSetCaption

chart1.AxisX.Label(nRow)

bSetCaption = true

endif

Dim pa As PointAttributes = chart1.Point(nCol, nRow)

chart1.IniValue(nCol, nRow) = dtStartTime.ToOADate()

chart1.Value(nCol, nRow) = dtEndTime.ToOADate()

pa. ... = ...

chart1.Series(nRow).Tag

next subtask

next task

chart1.CloseData(COD.IniValues)

chart1.CloseData(COD.Values)

I'm using:

chartfx.dll Version 6.0.839.0 (6.0.1445.41465) 16-Dec-2003 23:02:22

chartfx.base.dll Version 6.0.839.0 (6.0.1353.24702) 15-Sep-2003 13:43:34

chartfx.borders.dll Version 6.0.839.0 (6.0.1353.24718) 15-Sep-2003 13:44:06

System.ArgumentOutOfRangeException: Specified argument was out of the range

of valid values.

Parameter name: Index was out of range. Must be non-negative and less than

the size of the collection.

at

System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32

index)

at SoftwareFX.ChartFX.LabelList.get_Item(Int32 i)

at SoftwareFX.ChartFX.AxisBase.CZ(17 1AF, IGraphicsEx 1AG, Rectangle[]

1AH, SetPropFlag& 1AI, 0S 1AJ)

at SoftwareFX.ChartFX.AxisCollection.DG(17 1C3, IGraphicsEx 1C4,

Rectangle[] 1C5, 0S 1C6)

at SoftwareFX.ChartFX.Chart.DS(17 1CV, IGraphicsEx 1CW, Boolean 1CX,

Boolean 1CY)

at SoftwareFX.ChartFX.Chart.DR(17 1CR, IGraphicsEx 1CS, Rectangle& 1CT,

Int32& 1CU)

at SoftwareFX.ChartFX.Chart.DQ(PaintBar 1CO, IGraphicsEx 1CP, Rectangle&

1CQ)

at SoftwareFX.ChartFX.0X.OnPaint(PaintEventArgs e)

at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e,

Int16 layer, Boolean disposeEventArgs)

at System.Windows.Forms.Control.WmPaint(Message& m)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)

at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,

Int32 msg, IntPtr wparam, IntPtr lparam)

at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

at

System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMetho

ds+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason,

Int32 pvLoopData)

at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason,

ApplicationContext context)

at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason,

ApplicationContext context)

at System.Windows.Forms.Application.RunDialog(Form form)

at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)

at System.Windows.Forms.Form.ShowDialog()

at RTDisp.modMain.Main(String[] args) in

D:\24268\RealTimeMonitor\RTDisp\modMain.vb:line 90

Link to comment
Share on other sites

We do not recommend mixing builds specially between ChartFX.dll and

ChartFX.Base.dll, I am not saying this is the reason for the exception but

you should download the most recent service pack (or hotfix) to make sure

they are in sync.

If the problem persists after doing this, please save the chart as a binary

file (using the Export method) after your last chart call (CloseData) and

post the chart, this will allow us to duplicate the exception in case it is

data-dependent.

--

Regards,

JC

Software FX Support

"JM" <jm> wrote in message

news:qR5z%23zy6DHA.2468@webserver3.softwarefx.com...

> I get a ArgumentOutOfRangeException exception drawing the chart. I'm using

a

> Gantt chart with about 800 rows of 36 points. See call stack at end

>

> I'll tell you what I can now, but I suspect we will need to take an

> iterative approach to identify the problem.

>

> The exception does not occur for smaller datasets or if axis

labels/captions

> are not set in code (chart1.AxisX.Label(nRow))

>

> Essentially the code I'm using is:

> chart1.ClearData(ClearDataFlag.Data)

>

> chart1.Scrollable = False

>

> chart1.Gallery = Gallery.Gantt

>

> chart1.Stacked = Stacked.No

>

> chart1.Cluster = True

>

> chart1.MultipleColors = False

>

> chart1.AxisY.LabelsFormat.Format = AxisFormat.Time

>

> chart1.AxisY.AutoScale = True

>

> chart1.AxisX.Staggered = True

>

> Dim codFlagsValues As COD = COD.Values Or COD.AllocHidden Or COD.Remove

>

> Dim codFlagsIniValues As COD = COD.IniValues Or COD.AllocHidden Or

> COD.Remove

>

> chart1.OpenData(codFlagsValues, nPointsPerSeries, nSeries)

>

> chart1.OpenData(codFlagsIniValues, nPointsPerSeries, nSeries)

>

> for each task (nCol)

>

> bSetCaption = fasle

>

> for each subtask (nRow)

>

> if not bSetCaption

>

> chart1.AxisX.Label(nRow)

>

> bSetCaption = true

>

> endif

>

>

> Dim pa As PointAttributes = chart1.Point(nCol, nRow)

>

>

> chart1.IniValue(nCol, nRow) = dtStartTime.ToOADate()

>

> chart1.Value(nCol, nRow) = dtEndTime.ToOADate()

>

>

> pa. ... = ...

>

>

> chart1.Series(nRow).Tag

>

>

>

> next subtask

>

> next task

>

> chart1.CloseData(COD.IniValues)

>

> chart1.CloseData(COD.Values)

>

>

> I'm using:

> chartfx.dll Version 6.0.839.0 (6.0.1445.41465) 16-Dec-2003 23:02:22

> chartfx.base.dll Version 6.0.839.0 (6.0.1353.24702) 15-Sep-2003 13:43:34

> chartfx.borders.dll Version 6.0.839.0 (6.0.1353.24718) 15-Sep-2003

13:44:06

>

>

> System.ArgumentOutOfRangeException: Specified argument was out of the

range

> of valid values.

> Parameter name: Index was out of range. Must be non-negative and less

than

> the size of the collection.

> at

> System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32

> index)

> at SoftwareFX.ChartFX.LabelList.get_Item(Int32 i)

> at SoftwareFX.ChartFX.AxisBase.CZ(17 1AF, IGraphicsEx 1AG, Rectangle[]

> 1AH, SetPropFlag& 1AI, 0S 1AJ)

> at SoftwareFX.ChartFX.AxisCollection.DG(17 1C3, IGraphicsEx 1C4,

> Rectangle[] 1C5, 0S 1C6)

> at SoftwareFX.ChartFX.Chart.DS(17 1CV, IGraphicsEx 1CW, Boolean 1CX,

> Boolean 1CY)

> at SoftwareFX.ChartFX.Chart.DR(17 1CR, IGraphicsEx 1CS, Rectangle& 1CT,

> Int32& 1CU)

> at SoftwareFX.ChartFX.Chart.DQ(PaintBar 1CO, IGraphicsEx 1CP,

Rectangle&

> 1CQ)

> at SoftwareFX.ChartFX.0X.OnPaint(PaintEventArgs e)

> at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs

e,

> Int16 layer, Boolean disposeEventArgs)

> at System.Windows.Forms.Control.WmPaint(Message& m)

> at System.Windows.Forms.Control.WndProc(Message& m)

> at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)

> at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)

> at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,

> Int32 msg, IntPtr wparam, IntPtr lparam)

> at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

> at

>

System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMetho

> ds+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32

reason,

> Int32 pvLoopData)

> at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason,

> ApplicationContext context)

> at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason,

> ApplicationContext context)

> at System.Windows.Forms.Application.RunDialog(Form form)

> at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)

> at System.Windows.Forms.Form.ShowDialog()

> at RTDisp.modMain.Main(String[] args) in

> D:\24268\RealTimeMonitor\RTDisp\modMain.vb:line 90

>

>

Link to comment
Share on other sites

I don't know how I managed to mix versions of the two DLLs. I think I had a

particualar fix for some problem.

Anyway, I've upgraed to ChartFx 6.2 and the problem is resolved.

Thanks

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:bITbMpz6DHA.2468@webserver3.softwarefx.com...

> We do not recommend mixing builds specially between ChartFX.dll and

> ChartFX.Base.dll, I am not saying this is the reason for the exception but

> you should download the most recent service pack (or hotfix) to make sure

> they are in sync.

>

> If the problem persists after doing this, please save the chart as a

binary

> file (using the Export method) after your last chart call (CloseData) and

> post the chart, this will allow us to duplicate the exception in case it

is

> data-dependent.

>

> --

> Regards,

>

> JC

> Software FX Support

> "JM" <jm> wrote in message

> news:qR5z%23zy6DHA.2468@webserver3.softwarefx.com...

> > I get a ArgumentOutOfRangeException exception drawing the chart. I'm

using

> a

> > Gantt chart with about 800 rows of 36 points. See call stack at end

> >

> > I'll tell you what I can now, but I suspect we will need to take an

> > iterative approach to identify the problem.

> >

> > The exception does not occur for smaller datasets or if axis

> labels/captions

> > are not set in code (chart1.AxisX.Label(nRow))

> >

> > Essentially the code I'm using is:

> > chart1.ClearData(ClearDataFlag.Data)

> >

> > chart1.Scrollable = False

> >

> > chart1.Gallery = Gallery.Gantt

> >

> > chart1.Stacked = Stacked.No

> >

> > chart1.Cluster = True

> >

> > chart1.MultipleColors = False

> >

> > chart1.AxisY.LabelsFormat.Format = AxisFormat.Time

> >

> > chart1.AxisY.AutoScale = True

> >

> > chart1.AxisX.Staggered = True

> >

> > Dim codFlagsValues As COD = COD.Values Or COD.AllocHidden Or COD.Remove

> >

> > Dim codFlagsIniValues As COD = COD.IniValues Or COD.AllocHidden Or

> > COD.Remove

> >

> > chart1.OpenData(codFlagsValues, nPointsPerSeries, nSeries)

> >

> > chart1.OpenData(codFlagsIniValues, nPointsPerSeries, nSeries)

> >

> > for each task (nCol)

> >

> > bSetCaption = fasle

> >

> > for each subtask (nRow)

> >

> > if not bSetCaption

> >

> > chart1.AxisX.Label(nRow)

> >

> > bSetCaption = true

> >

> > endif

> >

> >

> > Dim pa As PointAttributes = chart1.Point(nCol, nRow)

> >

> >

> > chart1.IniValue(nCol, nRow) = dtStartTime.ToOADate()

> >

> > chart1.Value(nCol, nRow) = dtEndTime.ToOADate()

> >

> >

> > pa. ... = ...

> >

> >

> > chart1.Series(nRow).Tag

> >

> >

> >

> > next subtask

> >

> > next task

> >

> > chart1.CloseData(COD.IniValues)

> >

> > chart1.CloseData(COD.Values)

> >

> >

> > I'm using:

> > chartfx.dll Version 6.0.839.0 (6.0.1445.41465) 16-Dec-2003 23:02:22

> > chartfx.base.dll Version 6.0.839.0 (6.0.1353.24702) 15-Sep-2003 13:43:34

> > chartfx.borders.dll Version 6.0.839.0 (6.0.1353.24718) 15-Sep-2003

> 13:44:06

> >

> >

> > System.ArgumentOutOfRangeException: Specified argument was out of the

> range

> > of valid values.

> > Parameter name: Index was out of range. Must be non-negative and less

> than

> > the size of the collection.

> > at

> >

System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32

> > index)

> > at SoftwareFX.ChartFX.LabelList.get_Item(Int32 i)

> > at SoftwareFX.ChartFX.AxisBase.CZ(17 1AF, IGraphicsEx 1AG,

Rectangle[]

> > 1AH, SetPropFlag& 1AI, 0S 1AJ)

> > at SoftwareFX.ChartFX.AxisCollection.DG(17 1C3, IGraphicsEx 1C4,

> > Rectangle[] 1C5, 0S 1C6)

> > at SoftwareFX.ChartFX.Chart.DS(17 1CV, IGraphicsEx 1CW, Boolean 1CX,

> > Boolean 1CY)

> > at SoftwareFX.ChartFX.Chart.DR(17 1CR, IGraphicsEx 1CS, Rectangle&

1CT,

> > Int32& 1CU)

> > at SoftwareFX.ChartFX.Chart.DQ(PaintBar 1CO, IGraphicsEx 1CP,

> Rectangle&

> > 1CQ)

> > at SoftwareFX.ChartFX.0X.OnPaint(PaintEventArgs e)

> > at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs

> e,

> > Int16 layer, Boolean disposeEventArgs)

> > at System.Windows.Forms.Control.WmPaint(Message& m)

> > at System.Windows.Forms.Control.WndProc(Message& m)

> > at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)

> > at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)

> > at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,

> > Int32 msg, IntPtr wparam, IntPtr lparam)

> > at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&

msg)

> > at

> >

>

System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMetho

> > ds+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32

> reason,

> > Int32 pvLoopData)

> > at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32

reason,

> > ApplicationContext context)

> > at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason,

> > ApplicationContext context)

> > at System.Windows.Forms.Application.RunDialog(Form form)

> > at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)

> > at System.Windows.Forms.Form.ShowDialog()

> > at RTDisp.modMain.Main(String[] args) in

> > D:\24268\RealTimeMonitor\RTDisp\modMain.vb:line 90

> >

> >

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...