Jump to content
Software FX Community

Error recreating Bubble Chart


User (Legacy)

Recommended Posts

I have enumerated the steps that I took which resulted in the error:

Object reference not set to an instance of an object.ChartFX at

SoftwareFX.ChartFX.0N.FL(Int32 1EM, Int32 1EN)

at SoftwareFX.ChartFX.0N.FM(COD 1EO, Int32 1EP, Int32 1EQ)

at SoftwareFX.ChartFX.Chart.OpenData(COD cod, Int32 n1, Int32 n2)

1. Create a Bubble Chart with some data

SoftwareFX.ChartFX.Chart chart = new SoftwareFX.ChartFX.Chart();

chart.Gallery = SoftwareFX.ChartFX.Gallery.Bubble;

chart.OpenData(SoftwareFX.ChartFX.COD.Values, 2, bubbleDataList.Count);

chart.OpenData(SoftwareFX.ChartFX.COD.XValues, 1, bubbleDataList.Count);

...--->

2. Export the data from the Bubble chart to a binary format

MemoryStream ms = new MemoryStream();

chart.Export(SoftwareFX.ChartFX.FileFormat.Binary, ms );

voxChart.ChartUIData = ms.ToArray();

ms.Close();

3. Create a new chart

SoftwareFX.ChartFX.Chart chart = new SoftwareFX.ChartFX.Chart();

4. Import data from binary to the new chart

MemoryStream ms = new MemoryStream(voxChart.ChartUIData);

chart.Import( SoftwareFX.ChartFX.FileFormat.Binary, ms );

ms.Close();

5. Refresh the bubble chart with new data. This time I get the error at the

last line:

These steps work fine for other chart types. Ofcourse I am not using the

last line in creating the others.

chart.Gallery = SoftwareFX.ChartFX.Gallery.Bubble;

chart.OpenData(SoftwareFX.ChartFX.COD.Values, 2, bubbleDataList.Count);

chart.OpenData(SoftwareFX.ChartFX.COD.XValues, 1, bubbleDataList.Count);

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...