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
1075
Horizontal line in stacked line chart
posted

Hi,

When I use one numeric column in a line chart, the chart displays a horizontal line over the chart. When I try to do the same in a stacked line chart, nothing happens.

Apparently when I add another numeric column to the DataSource with the same values as the first numeric column, I get the result I want. But I don't want to do this because of two reasons:
It means I should 'hack' my code with a fake column and more importantly, the description on the X-axis does not make sense anymore (a label on each side of the chart instead of one in the center).

In the documentation I found "Note that it is recommended that the data set contains two or more numeric columns so that each line can have two or more points.". So it says recommended, but not mandatory.

Can someone help me to get horizintal lines with one numeric data column in a stacked line chart? Thanks in advance.

I am using version 10.3.20103.1000.

Parents
No Data
Reply
  • 53790
    posted

    Hello TorX,

    I`ll try to explain why it is not possible to have stacked line chart using only one numeric data column. Let`s take a look at the table in our online documentation. Each row in the table (IBM, MSN, MCI ….) represent a line in your chart. Each numeric column (Monday, Tuesday… ) represent point for  relevant line. So if we want to draw just one  line (for example IBM series) we need one row in the table and two numeric columns (for example Monday and Tuesday – the line will be between these two points).  

    In our scenario we need to have stacked lines, so we need to add by one row in the table  for each line in the chart.  If we want to have more complicated lines (with more points), we need to have additional numeric columns (for example Wednesday, Thursday …)

    If we are using the property myColumnLayer.SwapRowsAndColumns = true; we only swap the rows with columns. It means that each line will be represent by column and each point for relevant line will be represent by row in the table.

    In both scenarios we need to have two or more rows and two or more columns to be able to draw stacked line chart.

    Please let me know if you have any questions.

    Regards

     

    StockName

    Monday

    Tuesday

    Wednesday

    Thursday

    Friday

    IBM

    111

    96

    85

    125

    65

    MSN

    75

    23

    15

    75

    100

    MCI

    55

    63

    84

    95

    80

    ATT

    12

    12

    40

    60

    50

    VER

    69

    95

    110

    98

    123

     

Children