Dear all,
I'm a newbie so I need some advice from everyone for my solution. I need create a composite chart which has 3 type of chart: line chart, scatter chart and column chart.
Every point in chart has x-value is Date (example: 03-10-2013) and y-value is value (example: 500). You can see in first attach image
Unfortunately, each type of chart require different type of axis:
So, I can't use same x-axis for 3 type of chart. Could you give me some advice.
Many thanks.
Hello Tran,
There are different approaches to solve this task. I made small sample for you. Please take a look at the attached sample and if you have any questions, feel free to write me
Regards
Here is the sample
Dear Georgi,
Thank you very much, it's exact what's I need. You save my day :)
Hi,
Please take a look at the modifications that I made into FillSceneGraph event and if you have any questions, feel free to write me
Thank for your help Georgi. This is function which I use to display value in column chart:
Private Sub UltraChart1_FillSceneGraph(ByVal sender As System.Object, ByVal e As Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs) Handles UltraChart1.FillSceneGraph
' recalculate coordinate line chart, scatter chart Dim listBox As New List(Of Box)() Dim texts As New List(Of Text)() For Each item As Primitive In e.SceneGraph Dim pl As Box = TryCast(item, Box) If pl IsNot Nothing AndAlso pl.Series IsNot Nothing Then listBox.Add(pl) End If
Dim line As Polyline = TryCast(item, Polyline) If line IsNot Nothing AndAlso line.Path <> "Legend" Then Dim k As Integer = 0 For Each pp As DataPoint In line.points pp.point.X = listBox(k).rect.X + (listBox(k).rect.Width / 2) k += 1 Next End If
' display value in column chart Dim box As Box = TryCast(item, Box) If box Is Nothing OrElse box.DataPoint Is Nothing Then Continue For End If
Dim text As New Text() text.labelStyle.HorizontalAlign = StringAlignment.Center text.labelStyle.VerticalAlign = StringAlignment.Center text.SetTextString(box.Value.ToString()) text.bounds = box.rect text.bounds.Width = 40
texts.Add(text) Next
For Each text As Text In texts e.SceneGraph.Add(text) Next
End Sub
Tran Viet Ha said:First, How can I hide label of series column chart (In my example it's "MCC Actual Usage").
axisX.Labels.SeriesLabels.Visible =false;
Tran Viet Ha said:Second, How can I show value of column outside of column.
Let me know if you have any questions.
Dear Georgi
Now my chart look like so close with chart in excel. It's so great! But there are 2 things I need your help.
First, How can I hide label of series column chart (In my example it's "MCC Actual Usage").
Second, How can I show value of column outside of column.
Thank you very much.