Problem with chart viewer

Hi,

After migration from VB6 to VS2005, i m still using chart viewer and the following code to draw chart. But the problem is....the chart is not drawn everytime, sometimes it can be generated but sometimes not. And i also face lockLoader error, is it caused by chart viewer?

cd = CreateObject("ChartDirector.API")

c = cd.XYChart(840, 320, &H9999FF, &H0S, 1)

Call c.setPlotArea(75, 60, 750, 190, &H99CCFF, -1, &H6699FF, &H6699FF, &H6699FF)

Call c.addLegend(10, 20, False, "", 8).setBackground(cd.Transparent)

Call c.addTitle("<*block,valign=absmiddle*><*img=star.png*><*img=star.png*> " & "Price Movement For The Past " & cboMonth.Text & " Month " & "<*img=star.png*><*img=star.png*><*/*>", "arialbi.ttf", 10, &HFFFFFF).setBackground(&H6699FF, -1, 1)

Call c.yAxis().setAutoScale(0.1, 0.1, 0)

Call c.yAxis().setTitle("%").setFontAngle(180)
End If

Call c.xAxis().setLabels(labels).setFontAngle(45)


Call c.xAxis().setLabelStep(lNo, 1)

Call c.xAxis().setTitle("<*block,valign=absmiddle*><*img=clock.png*>Date<*/*>")

Call c.xAxis().SetWidth(2)

Call c.yAxis().SetWidth(2)

layer = c.addLineLayer()

Call layer.setLineWidth(1)

data0 = VB6.CopyArray(lPrice)

labels = VB6.CopyArray(lDate)

Call layer.addDataSet(data0, &HFF0000, VB6.GetItemString(lsvSelected, 0))

Did anyone face this kind of problem before?

[1629 byte] By [BiBiMeiMei] at [2007-12-24]
# 1
These are problems specific to the ChartDirector control. I'd recommend you post questions about that control on the vendor's support forum.

The LoaderLock MDA warning you get is, most likely, also a problem with

that control. You can however safely ignore that warning, the CLR

is already initialized by your VB program. If the issue was real,

your program would deadlock immediately after startup.

nobugz at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2
All rights. Thank you.
BiBiMeiMei at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...