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?

