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.
Mark data source
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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:
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!
Yes, you have several options here:
1. You can assign it directly to Labels StringList:
Code: Select all
gantt1.Labels[0] = "first bar";
Code: Select all
gantt1.Add(startDate, endDate, y, "first bar", yourColour);
http://www.teechart.net/support/viewtopic.php?t=3450
http://www.teechart.net/support/viewtopic.php?t=8082
Hope this helps!
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
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.
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.
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:
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
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |