Page 1 of 1
Mark data source
Posted: Mon Feb 02, 2009 5:03 pm
by 13051613
Hello, i'm making a gantt chart and i have to change the mark text.
I have a lot of options to show different information, but i have to show a specified data that i have in a dataset.
how i can change the datasource of the Marks?
can i change the Marks text like the color of the gantt bars?
exemple:
Gantt1.Colors(0) = Color.Red
thanks.
Posted: Mon Feb 02, 2009 5:08 pm
by narcis
Hi Pujol1986,
Yes, you have several options here:
1. You can assign it directly to Labels StringList:
2. You can add them when populating series using Add method:
Code: Select all
gantt1.Add(startDate, endDate, y, "first bar", yourColour);
3. You can assign them using a datasource and LabelMember property as shown in the examples here:
http://www.teechart.net/support/viewtopic.php?t=3450
http://www.teechart.net/support/viewtopic.php?t=8082
Hope this helps!
Posted: Tue Feb 03, 2009 1:11 pm
by 13051613
Hi Narcís,
i test the code but it change the label of the task and i don't want it.
i need to change only the Mark of the task, for exemple:
I have a Task that have the Label "Máquina 105" and i want to show in the Mark the % of task completion.
If i put the code that you give me the label will change it's value to % of task completion.
how can i change the Mark value without changing the label of the task?
Thanks.
Posted: Tue Feb 03, 2009 2:26 pm
by yeray
Hi Pujol1986,
To modify the marks without modifying the axis labels, you could use gantt's event GetSeriesMark, for example, to modify the first mark:
Code: Select all
Private Sub Gantt1_GetSeriesMark(ByVal series As Steema.TeeChart.Styles.Series, ByVal e As Steema.TeeChart.Styles.GetSeriesMarkEventArgs) Handles Gantt1.GetSeriesMark
If e.ValueIndex = 0 Then
e.MarkText = "my custom label"
End If
End Sub
Posted: Tue Feb 03, 2009 3:36 pm
by 13051613
it's done.
thanks.