We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Issue with chart label formatting

Thread ID:

Created:

Updated:

Platform:

Replies:

123457 Mar 18,2016 12:30 PM May 23,2016 12:23 AM Xamarin.Forms 17
loading
Tags: SfChart
Kieran Pierce
Asked On March 18, 2016 12:30 PM

Hi,

I have this code set in my XAML

<chart:SfChart.SecondaryAxis>
            <chart:NumericalAxis>
              <chart:NumericalAxis.Title>
                <chart:ChartAxisTitle Text="{Binding Detail.Result.Result.AxisCostLabel}"/>
              </chart:NumericalAxis.Title>

              <chart:NumericalAxis.LabelStyle>
                <chart:ChartAxisLabelStyle LabelFormat = "0:0,0"/>
              </chart:NumericalAxis.LabelStyle>
              
              
            </chart:NumericalAxis>
          </chart:SfChart.SecondaryAxis>

but it has no effect, i am expecting the chart labels on the axis sot be formatted with no decimals and a , as thousands seperator

Mohamed Samsudeen K S [Syncfusion]
Replied On March 21, 2016 07:09 AM

Hi Kieran,

Thanks for contacting Syncfusion support.

It is possible to achieve the specified requirement by setting the LabelFormat as shown below.


<chart:NumericalAxis.LabelStyle>

  <chart:ChartAxisLabelStyle LabelFormat="#,###.00" />
</chart:NumericalAxis.LabelStyle>


Regards,
Samsudeen K S

Kieran Pierce
Replied On March 21, 2016 10:47 AM

That works, I have moved the format into a binable paramater and this is also working fne, but it will not work on the label formatiing of the trackbacll

I have this 

<chart:ChartTrackballBehavior.LabelStyle>

                <chart:ChartTrackballLabelStyle LabelFormat = "{Binding Detail.Result.Result.CostFormat}"/>

              </chart:ChartTrackballBehavior.LabelStyle>


and this


<chart:NumericalAxis.LabelStyle>

                <chart:ChartAxisLabelStyle LabelFormat = "{Binding Detail.Result.Result.CostFormat}"/>

              </chart:NumericalAxis.LabelStyle>


the format on the axis is fine, but not on the track ball, I can set the label format manualy on the track ball which does work but i want to bind it in order to set pre and post fixes based on data in the model


any ideas?


Suresh B [Syncfusion]
Replied On March 22, 2016 07:43 AM

Hi Kieran,

Thanks for contacting Syncfusion support.

We are unable to reproduce the issue “Binding is not working for trackball label format”. So, please check the attached sample and provide the modified sample as per your requirement to reproduce the issue.

Sample Link: SimpleSample

Thanks,
Suresh B

Kieran Pierce
Replied On March 22, 2016 09:50 AM

where is the sample? how do i see it

Suresh B [Syncfusion]
Replied On March 23, 2016 03:31 AM

Hi Kieran,

Sorry for the inconvenience caused,

Please find the sample link below, 
Link: 
http://www.syncfusion.com/downloads/support/directtrac/general/ze/SimpleSample-1574018957.zip

Thanks,
Suresh B


Kieran Pierce
Replied On March 23, 2016 05:35 AM

so i took a look at the sample, it did not work. i updated my version of sfchat to the one i can download to day. Now in debug i see the binding collect the formtatting but track ball does not work at all in IOS simulatre in my project or in the what could be happing?

Kieran Pierce
Replied On March 23, 2016 09:15 AM

That message was not great I typed it on my phone.

What I am trying to say is:

On my system the Sample and My App does not work. With an older version of the .dll the trackball works on the graph but with the issue I have been having on the data binding. I have upgraded the .dll to the latest version I downloaded form the site today. This has made the data binding work. But the trackball is not working at all on the simulator and a real phone all running IOS 9.2, what I mean buy his is that dragging my finger over the graph I see no trackball info any more.

Kieran Pierce
Replied On March 23, 2016 09:59 AM

I just tested this on Android and here the Trackball does work but the formatting of the label will not databind. can you confirm the version of the dll files you are using please

Mohamed Samsudeen K S [Syncfusion]
Replied On March 24, 2016 10:23 AM

Hi Kieran,

We are not able to reproduce the reported issues in our end. Please find our latest Essential Studio 2015 Volume 4 Service Pack Release 2 v13.4.0.63 under the following link.

http://www.syncfusion.com/forums/123314/essential-studio-2015-volume-4-service-pack-release-v13-4-0-63-available-for-download

If you are still facing this issue, we kindly request you to update us the modified sample for helping you further.

Regards,
Samsudeen K S

Kieran Pierce
Replied On March 29, 2016 04:04 PM

Hi,

I can now get the sample to work, the odd thing is that none of the chat behaviors work in my app, they used to

hers the code

<chart:SfChart  VerticalOptions="FillAndExpand" IsVisible="{Binding BudgetVisible}" BackgroundColor="Transparent" >


          

            <chart:SfChart.PrimaryAxis>

            <chart:CategoryAxis LabelPlacement="BetweenTicks"  ZoomFactor="1"  LabelRotationAngle = "0" LabelsIntersectAction="MultipleRows">

              <!--SelectedIndex="{Binding SelectedValue}"-->

              <chart:CategoryAxis.Title>

                <chart:ChartAxisTitle Text="Day of Month"/>

              </chart:CategoryAxis.Title>

            </chart:CategoryAxis>

          </chart:SfChart.PrimaryAxis>


          <chart:SfChart.SecondaryAxis>

            

            <chart:NumericalAxis>

              <chart:NumericalAxis.Title>

                <chart:ChartAxisTitle Text="Cost"/>

              </chart:NumericalAxis.Title>


              <chart:NumericalAxis.LabelStyle>

                <chart:ChartAxisLabelStyle LabelFormat = "{Binding Detail.Result.Result.CostFormat}"/>

              </chart:NumericalAxis.LabelStyle>

            </chart:NumericalAxis>

          

          </chart:SfChart.SecondaryAxis>

          

          <chart:SfChart.Series>

            <chart:ColumnSeries ItemsSource = "{Binding Detail.Result.Result.DaysCumForGraph}" Color="{x:Static statics:Palette.LemongrassGreen}"/>

            <chart:LineSeries ItemsSource = "{Binding Detail.Result.Result.DaysBudgetForGraph}" Color="{x:Static statics:Palette.DarkGreen}"/>

          </chart:SfChart.Series>


          <chart:SfChart.ChartBehaviors>


            <chart:ChartZoomPanBehavior />

            


            <chart:ChartTrackballBehavior x:Name="trackBall" ShowLine="False" LabelDisplayMode="NearestPoint">

              <chart:ChartTrackballBehavior.LabelStyle>

                <chart:ChartTrackballLabelStyle LabelFormat="{Binding Binding Detail.Result.Result.CostFormatTrackBall}" />

              </chart:ChartTrackballBehavior.LabelStyle>

            </chart:ChartTrackballBehavior>

                   

            

          

          

          </chart:SfChart.ChartBehaviors>



          



        </chart:SfChart>


any ideas


Kieran Pierce
Replied On March 29, 2016 04:36 PM

Just tested this same code in windows phone 8.1 and it works fine including the binding which did not work befor the sfchar update

Yuvaraj Palanisamy [Syncfusion]
Replied On March 30, 2016 11:11 AM

Hi Kieran,

We are not able to reproduce the reported issues in our end.  We have prepared sample based on this. Please download the sample from location given below.


http://www.syncfusion.com/downloads/support/forum/123457/ze/SimpleSample-15740189571405615776

If you are still facing this issue, we kindly request you to update us the modified sample for helping you further.

Regards,
Yuvaraj


Kieran Pierce
Replied On April 7, 2016 08:19 AM

I have finally tracked down the issue. you need to have 2 charts on the same page, then the chart behaviours only apply the last one added. how to fix this?

Saravana Pandian Murugan [Syncfusion]
Replied On April 8, 2016 09:55 AM

Hi Kieran,

We are unable to reproduce the reported issue. We have prepared a sample which contains two Charts on the same page. Please download the sample from the location given below.

Sample : http://www.syncfusion.com/downloads/support/forum/123457/ze/ChartLabel1677899722

If you are still facing this issue, we kindly request you to update us the modified sample for helping you further.

Thanks,
Saravana Pandian M.

Kieran Pierce
Replied On May 20, 2016 11:50 AM

The issue is if you set the second chart in the stack to invisible

Kieran Pierce
Replied On May 20, 2016 12:01 PM

oh forgot to say, the latest SP have fixed the issue 

Saravana Pandian Murugan [Syncfusion]
Replied On May 23, 2016 12:23 AM

Hi Kieran,

Thanks for your update. We are glad to know that the given solution works. Please contact us if you need any further assistance.

Regards,
Saravana Pandian M.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;