Multiple Scatter Lines Series in a Chart.


V

Vinayan3

Hi,
I am trying to make a chart with 2 Series. The first series displays
correctly. I added another series it does not display on screen at all.
The second series is intended to 'highlight' a region. I tried
adjusting the color of a number of points. I do not know how to caption
a specific region on the graph so users were confused what the red dots
ment. I'm not sure what to do. The second series makes sense. The
legend displays the second series however the graphg it self does not
display it at all.
Code for the first series
ChartSpace1 = New OWC10.ChartSpace
'Create a new chart within ChartSpace1
Chart1 = ChartSpace1.Charts.Add(0)

'Add a new dataseries within Chart1:
Chart1_Series1 = Chart1.SeriesCollection.Add()

'Make Chart one a scatter line type graph.
Chart1_Series1.Type =
ChartChartTypeEnum.chChartTypeScatterSmoothLine

'Name the chart

Chart1_Series1.SetData(OWC10.ChartDimensionsEnum.chDimSeriesNames, _
OWC10.ChartSpecialDataSourcesEnum.chDataLiteral,
chartTitle)
'GATHER THE DATA FOR It....

'Populate the X and Y values from x and y array:
Chart1_Series1.SetData(OWC10.ChartDimensionsEnum.chDimXValues,
_
OWC10.ChartSpecialDataSourcesEnum.chDataLiteral, XAxis)

Chart1_Series1.SetData(OWC10.ChartDimensionsEnum.chDimYValues,
_
OWC10.ChartSpecialDataSourcesEnum.chDataLiteral, YAxis)


Second Seires code:
Chart1_Series1 = Chart1.SeriesCollection.Add()

Chart1_Series1.Type =
ChartChartTypeEnum.chChartTypeScatterSmoothLine
'Name the chart

Chart1_Series1.SetData(OWC10.ChartDimensionsEnum.chDimSeriesNames, _
OWC10.ChartSpecialDataSourcesEnum.chDataLiteral,
"Torque")

'GATHER THE DATA FOR It...


Chart1_Series1.SetData(OWC10.ChartDimensionsEnum.chDimXValues, _
OWC10.ChartSpecialDataSourcesEnum.chDataLiteral,
Xtorque)


Chart1_Series1.SetData(OWC10.ChartDimensionsEnum.chDimYValues, _
OWC10.ChartSpecialDataSourcesEnum.chDataLiteral,
Ytorque)
Chart1.SeriesCollection(1).Line.Color = "Red"
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top