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
170
UltraChart
posted

I am retrieving data in the following format

Column1         Column2

0.1                    0.2

0.3                    0.2

I want Column1 to be the X-axis and Column2 to be the Y-axis. I tried setting the type to ScatterLineChart and

ultraChart1.DataSource = dataSet;

ultraChart1.DataBind();

I get the error: You must include at least one row and two numeric columns in Scatter Chart Appearance - ColumnX and ColumnY

Any suggestions?

  • 17605
    posted

    You need to add and one text column. You can try something like:

    this.ultraChart1.ChartType = Infragistics.UltraChart.Shared.Styles.ChartType.ScatterChart;

    DataTable table = new DataTable();

    table.Columns.Add("Label", typeof(string));

    table.Columns.Add("Column1", typeof(double));

    table.Columns.Add("Column2", typeof(double));

    table.Rows.Add(new object[ { "a", 0.1, 0.2 });

    table.Rows.Add(new object[ { "b", 0.3, 0.2 });

    this.ultraChart1.DataSource = table;

    this.ultraChart1.DataBind();