Y Axis Label
#1
Posted 27 May 2010 - 06:00 PM
Thanks
Jason Barr
#2
Posted 28 May 2010 - 05:18 AM
You cannot set text(string) inside AxisYLabels as Visifire doesn't support this feature. Also, we did not find the sample attached along with your post. Would you please attach the sample so that we can look into the matter again.
#3
Posted 28 May 2010 - 01:26 PM
Hi Jason,
You cannot set text(string) inside AxisYLabels as Visifire doesn't support this feature. Also, we did not find the sample attached along with your post. Would you please attach the sample so that we can look into the matter again.
Here is the attachment please let me know if you know any work around or when this feature will be available.
sample.png 16.05K
35 downloadsThanks
Jason
#5
Posted 04 June 2010 - 09:05 PM
CustomAxisLabels for axis has been implemented in Visifire. Please checkout the blog post here. Below is an example for you.

Chart XAML
<vc:Chart xmlns:vc="clr-namespace:Visifire.Charts;assembly=SLVisifire.Charts"
Width="500" Height="300" Theme="Theme1" BorderThickness="0.5" BorderBrush="Gray" AnimatedUpdate="true" >
<vc:Chart.Titles>
<vc:Title Text="Athens 2004 Olympics" FontFamily="Arial" FontSize="14"/>
</vc:Chart.Titles>
<vc:Chart.AxesX>
<vc:Axis Title="Country"/>
</vc:Chart.AxesX>
<vc:Chart.AxesY>
<vc:Axis AxisMinimum="0" AxisMaximum="60" Title="Gold Medals Won">
<vc:Axis.Ticks>
<vc:Ticks Enabled="false"></vc:Ticks>
</vc:Axis.Ticks>
<vc:Axis.AxisLabels>
<vc:AxisLabels Enabled="false"></vc:AxisLabels>
</vc:Axis.AxisLabels>
<vc:Axis.CustomAxisLabels>
<vc:CustomAxisLabels>
<vc:CustomAxisLabels.Labels>
<vc:CustomAxisLabel From="0" To="0" Text="Zero"></vc:CustomAxisLabel>
<vc:CustomAxisLabel From="10" To="10" Text="Ten"></vc:CustomAxisLabel>
<vc:CustomAxisLabel From="20" To="20" Text="Twenty"></vc:CustomAxisLabel>
<vc:CustomAxisLabel From="30" To="30" Text="Thirty"></vc:CustomAxisLabel>
<vc:CustomAxisLabel From="40" To="40" Text="Fourty"></vc:CustomAxisLabel>
<vc:CustomAxisLabel From="50" To="50" Text="Fifty"></vc:CustomAxisLabel>
<vc:CustomAxisLabel From="60" To="60" Text="Sixty"></vc:CustomAxisLabel>
</vc:CustomAxisLabels.Labels>
</vc:CustomAxisLabels>
</vc:Axis.CustomAxisLabels>
</vc:Axis>
</vc:Chart.AxesY>
<vc:Chart.Series>
<vc:DataSeries RenderAs="Column" LabelEnabled="True">
<vc:DataSeries.DataPoints>
<vc:DataPoint AxisXLabel="USA" YValue="50"/>
<vc:DataPoint AxisXLabel="China" YValue="35"/>
<vc:DataPoint AxisXLabel="Russia" YValue="27"/>
<vc:DataPoint AxisXLabel="Australia" YValue="17"/>
<vc:DataPoint AxisXLabel="Japan" YValue="16"/>
</vc:DataSeries.DataPoints>
</vc:DataSeries>
</vc:Chart.Series>
</vc:Chart>Regards,Somnath
#6
Posted 03 February 2011 - 05:40 AM
I am doing something similor to the abover sample but implemented in C# code.
VisifireChart Chart_Result = new VisifireChart();
List<string> YaxisLableS = new List<string>();
...
Visifire.Charts.Axis Yaxis = new Visifire.Charts.Axis();
CustomAxisLabels cals = new CustomAxisLabels();
for (int i = 0; i < YaxisLableS.Count; i++)
{
CustomAxisLabel cal = new CustomAxisLabel();
cal.From = cal.To = i;
cal.Text = YaxisLableS[i];
cals.Labels.Add(cal);
}
Yaxis.CustomAxisLabels =
Chart_Result.AxesY.Add(Yaxis);
Would you please give me some hits?
thank you !
I have known and corrected it.
#7
Posted 21 February 2012 - 09:33 PM
CustomAxisLabels cals = new CustomAxisLabels();
for (int i = 0; i < YaxisLableS.Count; i++)
{
CustomAxisLabel cal = new CustomAxisLabel();
cal.From = cal.To = i;
cal.Text = YaxisLableS[i];
cals.Labels.Add(cal);
}
calc.Add(cals);
Yaxis.CustomAxisLabels =calc;cals;
Chart_Result.AxesY.Add(Yaxis);
[s]It does not work.
I have known and corrected it.
In case anyone else stumbles across this... the fix is to .Add the new cal to the existing Yaxis.CustomAxisLabels (maybe .Clear it first), not to assign a brand-new CustomAxisLabels instance to Yaxis.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users










