I thought that much. But i have a problem with that approach. The thing is, in my use case line series are not to be shown for some scenarios is not to be be shown. So to make the handling easier what i have done is that return the number of series as 2 or 4 depending on the condition.
If i have to reverse the order of the series then i'm left with no option but to write some complex logic. So i was wondering is there is any API or any other means by which the drawing of the series can be changed.