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
627
How to remove series from column chart
posted

Hi,

I have 2 problems, one for column chart and one for ProbabilityChart:

1. In the column chart I have the follow dataTable as a data source :

1 106
2 30
3 25
4 19
5 8
6 5
7 4
9 2
10 1
13 1
21 1
31 1

 

and I wanna have chart with one bar per each row, meaning X axis will hold the first column from the table and Y axis will hold the seconf one, one bar per each row with Y axis value.

But the chart I'm getting contains 2 bars per each row. one for the first column (which also uses as x axis) and the other one for the second column.How can I remove the first series? (I hope the issue is clear)

 

2. In ProbabilityChart - I want the toolTip to show Y axis value when the mouse is over the point but I can see only X axis value

Please advice

Thanks

Maya

 

 

  • 26458
    Offline posted

    1. Do you mean to use the value from the first column as the label? If so, you should either set the type of the first column to string, or exclude the first column from the chart's datasource:

    chart.Data.IncludeColumn(0,false);

    Or you can create a NumericSeries where the value can be the 2nd column and the label can be the first one.

    2. Set chart.Tooltips.FormatString = "<DATA_VALUE_Y>";