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
40
Web Ultra Pie Chart Data Binding with DataSet
posted

Hi Guys

I am a newbie to Infragistics.

Is it possible to Bind a DataSet which has a single tabe with multiple columns to a Web pie chart and only show the required columns in the Pie chart and not all in the table. It just shows all of them regardless of the Include column.....what am I doing wrong?

I have the following sub.....

  Me.UltraChart1.Data.SwapRowsAndColumns = True

        Me.UltraChart1.Data.DataSource = Job_Chart_Data 'Data Set
        Me.UltraChart1.Data.DataBind()

            With UltraChart1

                .PieChart3D.ColumnIndex = 0
                .PieChart3D.OthersCategoryPercent = 0

                .Data.IncludeColumn(9, True)
                .Data.IncludeColumn(10, True)
                .Data.IncludeColumn(11, True)

            End With

 

Parents
  • 26458
    Suggested Answer
    Offline posted

    The pie chart will always look for the first available numeric column in your data source. It will also only display that column and ignore the others. And though you can use IncludeColumn method to exclude all columns preceding the one you want to display, I would suggest a different approach.

    Use a NumericSeries to bind to a specific column:

    Dim series as New NumericSeries()
    series.Data.DataSource = yourTable
    series.Data.ValueColumn = "columnName"
    series.DataBind()
    UltraChart1.Series.Add(series)

    Also, don't set SwapRowsAndColumns to true, as this will display rows from the tables instead of columns.

Reply Children