Jump to content
Software FX Community

Creating multiple lines on Y with matching values on X


User (Legacy)

Recommended Posts

Posted

I think the use of collections are great. Currently I paint a linecurve this 

way:

loop() {

series1.Add(dblVal);

DateTime dteTime = new DateTime(2005,1,24,

Convert.ToInt32(strTime.Substring(0,2)),Convert.ToInt32(strTime.Substring(2,2)),0);

series2.Add(dteTime);

}

allCol.Add(series1); // these are the values

allCol.Add(series2); // these are the times

ListProvider lstProvider = new ListProvider(allCol);

chart1.DataSourceSettings.DataSource = lstProvider;

My question is, if I want to paint another line on the graph, how do I do it

if I want to use collections. Do I work with legends? Can you provide me

with an example where I, in another loop fills series3 and 4 with values and

times and add it to the same datasource?

thanks / Henrik

Posted

You simply add this collection to your list and re-assign the DataSource. 

For example:

allCol.Add(series3);

ListProvider lstProvider = new ListProvider(allCol);

chart1.DataSourceSettings.DataSource = lstProvider;

--

FP

Software FX

Posted

OK, what happens if I have more values in series3 than series1 = I have more 

"time" values for series3 than the previous timearray series2. My

application hang when I tried to add a new array of series containing time.

best regards / Henrik

"SoftwareFX Support" <noreply@softwarefx.com> skrev i meddelandet

news:5h2$9LjAFHA.1144@webserver3.softwarefx.com...

> You simply add this collection to your list and re-assign the DataSource.

> For example:

>

> allCol.Add(series3);

>

> ListProvider lstProvider = new ListProvider(allCol);

>

> chart1.DataSourceSettings.DataSource = lstProvider;

>

>

> --

> FP

> Software FX

>

Archived

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

×
×
  • Create New...