Hi friends, I'm using UltraChart control v10.3 and I need to graph the following point:
Graph 1:
x ---- y
2 ----4
3 ----9
4 ----16
5 ----25
Graph 2:
x ----y
3 ---- 50
5 ----48.5
7 ----43
9 ----35
11 ----32
13 ----29
15 ----21
17 ----20
Note: The two graphs can contains different point in the X Axis.
I'm have this values in one Array A(n,m)
The Array A(1,i) contains my points for my first graph
The Array A(2,j) contains my points form my second graph.
I'm doing this: UltraChart.Datasource = A
But I don't have good results.
Please, any idea? What must I do?
Thanks, regards.
Hello Eros,
I`m not sure what kind of ChartType (ColumnChart or LineChart and etc...) you are using in your scenario. I made two samples for you, so could you please take a look at the attachments and let me know if you think that I misunderstood your scenario. If you have any questions, do not hesitate to write me
Regards
Hello, Please could you post this code in Vb.NET,
//foreach (Primitive pr in e.SceneGraph)
//{
// if (pr.GetType() == typeof(Text) && ((Text)pr).labelStyle != null && ((Text)pr).labelStyle.HorizontalAlign == StringAlignment.Far)
// {
// string ss = ((Text)pr).GetTextString();
// if (ss.Length >= 5)
// ss = ss.Remove(3);
// ((Text)pr).PE.Fill = Color.Red;
// ((Text)pr).SetTextString(ss);
// }
//}
Thanks you
Here is the code in VB:
Private Sub ultraChart1_FillSceneGraph(sender As Object, e As Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs) For Each pr As Primitive In e.SceneGraph If pr.[GetType]() = GetType(Text) AndAlso DirectCast(pr, Text).labelStyle IsNot Nothing AndAlso DirectCast(pr, Text).labelStyle.HorizontalAlign = StringAlignment.Far Then Dim ss As String = DirectCast(pr, Text).GetTextString() If ss.Length >= 5 Then ss = ss.Remove(3) DirectCast(pr, Text).PE.Fill = Color.Red DirectCast(pr, Text).SetTextString(ss) End If End IfNext End Sub
Private Sub ultraChart1_FillSceneGraph(sender As Object, e As Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs)
For Each pr As Primitive In e.SceneGraph
If pr.[GetType]() = GetType(Text) AndAlso DirectCast(pr, Text).labelStyle IsNot Nothing AndAlso DirectCast(pr, Text).labelStyle.HorizontalAlign = StringAlignment.Far Then Dim ss As String = DirectCast(pr, Text).GetTextString() If ss.Length >= 5 Then ss = ss.Remove(3) DirectCast(pr, Text).PE.Fill = Color.Red DirectCast(pr, Text).SetTextString(ss) End If End IfNext
End Sub
Thanks.
Regards. All have been finished.