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
80
UltraChart - PointChart3D - GetPrimitiveForRowColumn
posted

Hello, I started evaluating NetAdvantage with UltraWinChart

how can I access the items/primitives/bubbles/symbols of a chart (UltraChart, PointChart3D) programmatically in order to set them to different colors?

I tried the following code:

      // Create DataSource: x,y,z coordinates with value=10 

      DataTable table = new DataTable("ColouredPoint");

      DataColumn xColumn = new DataColumn();
      xColumn.DataType = System.Type.GetType("System.Int32");
      xColumn.ColumnName = "x";
      table.Columns.Add(xColumn);

      DataColumn yColumn = new DataColumn();
      yColumn.DataType = System.Type.GetType("System.Int32");
      yColumn.ColumnName = "y";
      table.Columns.Add(yColumn);

      DataColumn zColumn = new DataColumn();
      zColumn.DataType = System.Type.GetType("System.Int32");
      zColumn.ColumnName = "z";
      table.Columns.Add(zColumn);

      DataRow row = table.NewRow();
      row["x"] = 10;
      row["y"] = 10;
      row["z"] = 10;
      table.Rows.Add(row);

      // Bind datasource to chart

      m_chart.DataSource = table;
      m_chart.Data.DataBind();

      => Until here the Chart appears with a small bubble/sphere as displayed datapoint that is red by default.
      => I now want to set it to e.g. blue. Even if there were more of them I want to set only this one to blue.

       // Get the primitive of the first (and only) row of the data table

      // Doesn't work, n is NULL
      DataPoint n = (DataPoint) m_chart.Primitives.GetPrimitiveFromRowColumn(0, 0, typeof(DataPoint));
      // Doesn't work, n is NULL
      Symbol    n = (DataPoint) m_chart.Primitives.GetPrimitiveFromRowColumn(0, 0, typeof(DataPoint));
       => Here I have no idea which data type works

I searched for a Method like Children/Items/Primitives that returns a collection of all items in the chart but I was not able to identify one.

Is there anyone who can help me with this?