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?
You could try using ChartDrawItem and FillSceneGraph events. For more info try looking at the following posts:
http://forums.infragistics.com/forums/p/5297/23905.aspx
http://forums.infragistics.com/forums/p/3533/18711.aspx
http://forums.infragistics.com/forums/p/4881/22664.aspx