Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6078573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:50:56+00:00 2026-05-23T10:50:56+00:00

I cannot get the axis to format as currency, any idea? What am I

  • 0

I cannot get the axis to format as currency, any idea?

What am I doing wrong? I need to be able to change the formatting on the fly and for this test I wanted to set it as currency for the Y axis on the scale of values.

Anyone?

Thanks…

    var columnSeries = new ColumnSeries
                                 {   Title = reportProcedureNode.Value,
                                     IndependentValuePath = "PrimaryKey",
                                     DependentValuePath = "Value",
                                     IndependentAxis = new CategoryAxis { Orientation = AxisOrientation.X, ShowGridLines = false, Location = AxisLocation.Bottom},
                                     DependentRangeAxis = new LinearAxis(){Orientation = AxisOrientation.Y, ShowGridLines = false}
                                 };

        var labelStyle = new Style(typeof(AxisLabel));
        labelStyle.Setters.Add(new Setter(AxisLabel.StringFormatProperty, "{}{0:C0}"));

        var axis = (LinearAxis)columnSeries.DependentRangeAxis;
        axis.AxisLabelStyle = labelStyle;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:50:57+00:00Added an answer on May 23, 2026 at 10:50 am

    In my WPF4 version of the charting toolkit, your code crashes. I needed to change:

    labelStyle.Setters.Add(new Setter(AxisLabel.StringFormatProperty, "{}{0:C0}"));
    

    to:

    labelStyle.Setters.Add(new Setter(AxisLabel.StringFormatProperty, "{0:C0}"));
    

    That is, remove the {}. The {} comes from markup extension syntax:

    • {} Escape Sequence / Markup Extension

    and is only needed when being parsed by XAML as a markup extension inside "{...}".

    Since you are setting the property directly, no markup extension is involved and including it prevents the real currency format from being seen.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using cfchart and I cannot figure out how to get the Y-Axis
I cannot get this koch snowflake drawing working recursively. Recursive method public void koch(int
I cannot get wxErlang to work at all. Do i need to include a
I cannot get this to work. I have opened a SQL Server Express table
Cannot get this to work. First time using variables passed into functions. Unchecking radio
I cannot get this simple piece of code to compile without including the TestClass.cpp
I cannot get the comment buttons to render properly in IE7 and IE8. This
I cannot get this modal dialog to work property. Problem is that in a
cannot get the comments to show in actionscript file when running asdoc.. is this
Cannot get this statement to update the table and am almost certain my problem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.