Chart Localisation

7 posts, 0 answers
  1. Ed
    Ed avatar
    4 posts
    Member since:
    Dec 2012

    Posted 14 Aug 2014 Link to this post

    I have some charts in a master page site which display data in currency (£) terms.

    The localisation quick fix  http://www.telerik.com/help/aspnet-ajax/htmlchart-accessibility-and-internationalization-localization.html  works fine, but in my master page site it fails and the default $ is displayed.

    Does anybody know why a master page site messes this up?
  2. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1490 posts

    Posted 15 Aug 2014 Link to this post

    Hi Ed,

    I have already replied to the support ticket that was opened by on the matter and I paste my answer below, so that the rest of the forum members can benefit of it.

    Placing the script reference and kendo culture change code in the master page works properly for charts in the master page as well as charts in the content page on my side. Can you try the attached VS example and then tell me whether it works as expected?


    Regards,
    Danail Vasilev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Philipp
    Philipp avatar
    27 posts
    Member since:
    Mar 2011

    Posted 11 Dec 2015 Link to this post

    Hi,

     i have a lot of problems with the HTMLChart and the localization stuff. After a few hours of reading topics and forum-posts i still can't get it to work correct.

    I have 2 MasterPage-Files. MainPage.master for all main-views, and EditPage.master for all edit Frames (RadWindow-Contents)

    I have the same script-setup in those files (see picture 01, 02).

    In EditPage everything works as excpected but in MainPage it always chrashes saying "the Object doesnt support the Property or Method 'culture' "

    Picture 03 shows how the resources are loaded.

    Picture 04 shows how the Object -kendo- looks like in MainPage.Master.

    What happens here? Any help appreciated.

     

  5. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1490 posts

    Posted 12 Dec 2015 Link to this post

    Hello Philipp,

    It looks like the kendo object is not initialized yet for some reason. I would suggest that you open a support ticket (requires a subscription) where you can attach a runnable sample that reproduces the issue, so that I can investigate it further.

    Regards,
    Danail Vasilev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. Philipp
    Philipp avatar
    27 posts
    Member since:
    Mar 2011

    Posted 14 Dec 2015 in reply to Danail Vasilev Link to this post

    Hi Danail,

    it felt like i messed something up so i removed every single bit and restarted it along with your descritptions about localization.

    Right now i have the initialization of the kendo-object right and the resourcefile is loaded correctly. Never the less everything stayed in english, although i inspected the kendo-object at runtime and saw that cultures.current was 'de-DE'. Very strange. 

    I copied one of your demo chasrts to see if it fails the same way, but it didn't. Again i thought - very strange.

    Finally i realised what the problem was. I used ClientTemplates for the LabelsAppearance like this:

     

    <LabelsAppearance DataFormatString="N1">
        <ClientTemplate>
            #if(value > 0){# #=value# #}#
        </ClientTemplate>
    </LabelsAppearance>

    This doesn't work with localization on my end. When i remove the clientTemplate-block everything works as expected, with clientTemplate all stays english. Am i missing something here or do a mistake?

    Thanks for your support

  7. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3596 posts

    Posted 15 Dec 2015 Link to this post

    Hello Phillip,

    You can do this via the kendo.format() method:

    Here is a basic example:

    <LabelsAppearance>
        <ClientTemplate>
            #if(value > 0){# #= kendo.format(\'{0:C1}\', value)# #}#
        </ClientTemplate>
    </LabelsAppearance>

    Regards,

    Marin Bratanov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  8. Philipp
    Philipp avatar
    27 posts
    Member since:
    Mar 2011

    Posted 16 Dec 2015 in reply to Marin Bratanov Link to this post

    Hello Marin,

    perfect! Everything fine now. Thank you all for your great support (as always).
    Right now i really enjoy the htmlChart-Control as a excellent visualisation tool.
    Also the clientExportManager is a nice addition to the the controls (i thought of doing this by myself a year ago but had no time ^^).

    Best regards,

    Philipp

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017