Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
125
Step-line chart and multiple lines
posted

Hi,

how can I display mutiple lines on a step-line chart?
I would like to show the variations of two different values over the same time scale (purchases and sales of a particular item). I built a DataTable from my database, which has time values on the first column and data values on the other two columns, but when I create a step line chart, only the second column is taken into consideration (purchases column).

How can I make it work? Should I initialize a composite chart?

The final result should be something like this:
http://www.advsofteng.com/images/stepline.png

Edit:
I tried to set up my chart as a composite chart through code, as explained in infragistics documentation and splitted purchases and sales in 2 different datatables, but without succes. I can only see an empty chart with an Y axis vith values between -1 and 1

Parents
No Data
Reply
  • 125
    posted

    I made some progress but still i'm not getting what I want.

    The problem comcerning wrong data on the Y axis is solved. I just didn't used NumercTimeSeries.
    I can display 2 lines from 2 different series initialized from the same DataTable, but:

    • I have to initialize my chart as a composite chart with a single layer, with a step line chart type, 2 axes and 2 series, wich seems pretty strange as i guess it could be possible to make the same with a simpe chart type. In fact the documentation says that a step line chart can have 1 or more NumericTimeSeries, but i can't make it work this way. What am I doing wrong?
    • On the X axis there are more time labels than the number of dates present in my DataTable. And they do not coincide. It seem like the chart generates these points as equispaced divisions of the axis, and I do not want that. I want that only dates on the timevalue column are displayed, and with a spacing that reflects the distance between dates (as I can get with a simple type chart). But how?

     

Children