This is a migrated thread and some comments may be shown as answers.

[Solved] Scatter Line multiple series

1 Answer 20 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Mels
Top achievements
Rank 1
Mels asked on 24 Jul 2012, 09:58 PM
Hi,

I'm trying to get multiple lines in a scatter line chart. In the examples it is done as such:
.Series(series => {
        series.ScatterLine(d => d.RPM, d => d.Power);
                 
        series.ScatterLine(d => d.RPM, d => d.Torque)
              .YAxis("torque");
    })
This all seems very easy, but I don't know at compile-time how many lines I'm going to have, so this approach won't work.

I saw there was a ScatterLine method  with a parameter of type IEnumerable, but I can't find anywhere how to use it. If I could use this, it would solve my problem as I could just write something like:
.Series(series => {
        for (int i = 0; i < listOfLists.Count; i++)
        {
            series.ScatterLine(listOfLists[i]);
        }
    })

I hope there is a way to achieve this for the general case. I was able to add multiple series to a bar chart in a similar fashion. I don't want to use the regular line chart, because it doesn't give me enough control over the major and minor lines on the axis.

Regards,

Mels

1 Answer, 1 is accepted

Sort by
0
Shankar
Top achievements
Rank 1
answered on 28 Jul 2012, 05:10 AM
Me too having the same problem guys... Need a work around for this. 
Tags
Chart
Asked by
Mels
Top achievements
Rank 1
Answers by
Shankar
Top achievements
Rank 1
Share this question
or