OWC11 - Dynamically draw chart from datasource with null values and splitting of a chart

Hi,
i'm searching for a solution.I'm developing th home page (default.aspx) of my site and I would make a OWC11 chart.
The problem is that I have a <img> in this aspx and I use the ExportPicture method to show the chart.

I wrote a method in default.aspx.vb to create the chart, this is the code:

"dsPrice.ReadXml(ConfigurationManager.AppSettings("WebItaPath") & "Unit\Cumul.xml")

Dim Chart1, Chart1_Series1

Dim ChartSpace1 = New OWC11.ChartSpaceClass


Dim xp, xn, xe, y, i

Dim NumRighe As Integer

NumRighe = dsPrezziEt.Tables(0).Rows.Count - 1

ReDim xp(NumRighe)

ReDim xe(NumRighe)

ReDim xn(NumRighe)

ReDim y(NumRighe)

i = 0

For Each drPrezziEt In dsPrice.Tables(0).Rows


xp(i) = drPrezziEt.Item("Powernext")

xe(i) = drPrezziEt.Item("EEX")

xn(i) = drPrezziEt.Item("NordPool")

y(i) = drPrezziEt.Item("Data")


i = i + 1

Next


ChartSpace1.clear()

ChartSpace1.Refresh()

'Build graph

Chart1 = ChartSpace1.Charts.Add(0)

Chart1_Series1 = Chart1.SeriesCollection.Add(0)

With Chart1

.HasTitle = False

.Border.Color = "white"

With .PlotArea

.Interior.Color = "white"

.Border.Color = "white"

End With

With .Axes(OWC11.ChartAxisPositionEnum.chAxisPositionBottom)

.MajorTickMarks = ChartTickMarkEnum.chTickMarkNone

.Line.Color = "lightgrey"

.TickLabelSpacing = 25

.font.size = 6


End With

With .Axes(OWC11.ChartAxisPositionEnum.chAxisPositionLeft)

.MajorTickMarks = ChartTickMarkEnum.chTickMarkNone

.MajorGridlines.Line.Color = "lightgrey"

.Line.Color = "lightgrey"

.HasTitle = True

.Title.Caption = "€/t CO2"

.Title.Font.Size = 7

End With

End With

Chart1_Series1.Line.Color = "darkgreen"

Chart1_Series1.Type = OWC11.ChartChartTypeEnum.chChartTypeLine

Chart1_Series1.SetData(OWC11.ChartDimensionsEnum.chDimSeriesNames,

OWC11.ChartSpecialDataSourcesEnum.chDataLiteral, "Chart1_Series1")

Chart1_Series1.SetData(OWC11.ChartDimensionsEnum.chDimCategories,

OWC11.ChartSpecialDataSourcesEnum.chDataLiteral, y)

Chart1_Series1.SetData(OWC11.ChartDimensionsEnum.chDimValues, OWC11.ChartSpecialDataSourcesEnum.chDataLiteral,

xp)

Chart1_Series1.SetData(OWC11.ChartDimensionsEnum.chDimValues, OWC11.ChartSpecialDataSourcesEnum.chDataLiteral,

xe)

Chart1_Series1.SetData(OWC11.ChartDimensionsEnum.chDimValues, OWC11.ChartSpecialDataSourcesEnum.chDataLiteral,

xn)

Dim ImagePath As String

ImagePath = ConfigurationManager.AppSettings("GraphPath") & "Graphs\Cumul.gif"

ImgET.Visible = True

ChartSpace1.ExportPicture(ImagePath, "gif", 270, 120)

'405, 180)

Me.ImgET.ImageUrl = "\Images\Graphs\Cumul.gif"


End Sub"

The chart that I can see after default.aspx execution is wrong,because there are same null value in xp, xn, xe array.I

would to use the tips inhttp://support.microsoft.com/default.aspx?scid=kb;EN-US;q286317,but I don't know where I must

put the class attribute to "clsid:0002E55D-0000-0000-C000-000000000046".Are there any other solution?
Then I would to split my chart in 3 parts,one for every: xp, xn, xe series.How can I do it?
Can you help me,please?
Thank you in advance!!!

[3947 byte] By [Newbie] at [2008-1-1]
# 1

This group is specific for the VSTO technology, which doesn't include general Office automation or the Office Web Controls (OWC). There's a newsgroup for OWC, listed in the "Please Read First" message at the top of this forum:

http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.office.developer.web.components&lang=en&cr=US

CindyMeister at 2007-9-12 > top of Msdn Tech,Visual Studio Tools for Office,Visual Studio Tools for Office...