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
1187
Format axis labels
posted

I am using a bar chart for the first time with multiple bars per 'series'.  My data source is a datatable with 4 columns; datetime, integer, integer, integer.

 1. How can I format the X axis series labels for the date 'MM/dd'.  Only show the month and day.  I have tried several things including ".Axis.X.Labels.ItemFormatString = "<ITEM_LABEL:MM/dd>"" without success.

 2. How can keep my Y axis labels whole numbers only.  My data values are low numbers generally between 2 and 10 so the X axis wants to show fractions.   I only want to show whole numbers; 1,2,3,4,5,6,7,8,9,10.

 3. How can I customize the bar labels on the X axix?  My integer column names are 'qty1', 'qty2' and 'qty3'.  How can I set the column labels on the chart through code?  Instead of 'qty1', show 'Sales Over'.

Parents
No Data
Reply
  • 28496
    Offline posted

    1: since the bar chart interprets the x axis labels as strings and not dates, this formatting is not possible.  you can implement IRenderLabel to achieve the desired result.

    2: Axis.Y.Labels.ItemFormatString = "<DATA_VALUE:#>";

    3: see the documentation topics on IRenderLabel, they should explain how to solve this problem.

Children