Is there a way to make some of the labels in the y-axis bold/larger font? (To create group headers.)
Using TChart android in xamarin.
Individual styling of labels in axis
Re: Individual styling of labels in axis
Edit: using gantt chart
Re: Individual styling of labels in axis
Hello Calzone,
The code below shows you how can change each axis label:
Hoping this helps you, otherwise don't hesitate to contact us.
Thanks in advances
The code below shows you how can change each axis label:
Code: Select all
tChart1.Axes.Left.Labels.Items[0].Font.Bold = true;
tChart1.Axes.Left.Labels.Items[1].Font.Size = 15;
Thanks in advances
Best Regards,
Sandra Pazos / 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 |
Re: Individual styling of labels in axis
Hi
Thanks for the reply.
In my app the "chart.Axes.Left.Labels.Items.count" is 0. ( after chart.Series.Add(gantt);)
I do not explicitly add any labels, Its labels from "gantt.Add(pkt.FromDate, pkt.ToDate, pkt.Order, pkt.Name);" I wish to highlight based om some property.
Thanks for the reply.
In my app the "chart.Axes.Left.Labels.Items.count" is 0. ( after chart.Series.Add(gantt);)
I do not explicitly add any labels, Its labels from "gantt.Add(pkt.FromDate, pkt.ToDate, pkt.Order, pkt.Name);" I wish to highlight based om some property.
Re: Individual styling of labels in axis
Hello Calzone,
Sorry, I didn't inform you that is necessary use CustomLabels to get the result you expected. I have modified the above code to do as you want.
Could you tell us if it now works in your end?
Hoping this helps you.
Thanks in advance
Sorry, I didn't inform you that is necessary use CustomLabels to get the result you expected. I have modified the above code to do as you want.
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
Steema.TeeChart.Styles.Gantt gantt = new Steema.TeeChart.Styles.Gantt(tChart1.Chart);
gantt.FillSampleValues(10);
tChart1.Axes.Left.Labels.Items.Clear();
for (int i=0; i<gantt.Count; i++)
{
tChart1.Axes.Left.Labels.Items.Add(gantt.YValues[i], gantt.Labels[i]);
if (i%2==0)
{
tChart1.Axes.Left.Labels.Items[i].Font.Bold = true;
}
else
{
tChart1.Axes.Left.Labels.Items[i].Font.Size = 12;
}
}
}
Hoping this helps you.
Thanks in advance
Best Regards,
Sandra Pazos / 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 |