Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
4970
how to put number on the top of the column?
posted

When I set ChartType as ChartType.Column, there are a few rectangle column display in the graph based on the number value. Y axis have the number display.

but I want to 2 things can be set for this case:

1. how to change the format of number on Y axis to Currency number, for example, if the number is 20000, I want to it display as $20,000

2. how to put the right number for the column on the top of each column rectangle.

Parents
  • 30945
    Verified Answer
    Offline posted

    Hello,

     

    Thank you for your post.  I have been looking into it and for the formatting of the Y axis, you can define a Axis in the Axes collection of the xamWebChart and set its AxisType to PrimaryY. After doing so you can set the Label property of the axis to a LabelGroup. The LabelGroup contains a Format property, which can be set in order to format the labels of the Y axis. You can set this property to “{}{0:C0}” for example in order to format the axis as currency.

     

    Regarding the second question that you are having. You can set the Marker property of each series that you with to have the value displayed on top of the rectangle to a Marker. The Marker also contains a Format property.

     

    Also I can suggest looking into our XamDataChart control for implementing the same functionality, since the XamWebChart control is already retired (you can read more details on the matter here: http://ko.infragistics.com/community/blogs/jason_beres/archive/2011/11/10/important-product-changes-and-control-retirements-in-2011-2.aspx). Using the XamDataChart, you will have more accurate control over the Markers, by using a DataTemplate for the MarkerTemplate property of the series. I have created a sample application for you that demonstrates how you can implement the features that you referred using both XamWebChart and XamDataChart.

     

    If you need any further assistance on the matter, please do not hesitate to ask.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

    DataAndWebChart.zip
Reply Children
No Data