none
control the X Axis RRS feed

  • Question

  • Anyone knows how I can make the labels appear only for a group of CategoryGroup data items?

     

    I have a graph how’s X axis is up to 52 Friday dates. (Each with corresponding y values)

    Now it shows up to 52 labels.

     

    I need it to show only when the month has changed so there will be up to 52 data points but only up to 12 labels.

     

    Am I asking too much? (I need to replace excel )

     

     

     

    Wednesday, February 27, 2008 7:01 PM

Answers

  • It sounds like you are using a category axis (not a scalar DateTime axis).  The category group groups the data by week (Friday's) I suppose.  Try setting the x-axis major interval to 4, which should show labels for every 4th Friday, which is an approximation.

     

    More info: http://msdn2.microsoft.com/en-us/library/aa964128.aspx#moressrscharts_topic3

    From the whitepaper :-)

  • Category mode (the Numeric or time-scale values option is not selected)

    Based on the category group expression values, the chart control matches categories across multiple series (for example, data for the January category in the 2006 series will be in the same cluster as data for the January category in the 2007 series).

    Format string settings on the X Axis tab have no effect unless the category group expression (or label expression as in Figure 4) evaluates to a numeric or DateTime data type. Often when you use category mode, the category group expression evaluates to a string object, hence a format code applied later has no effect. You can either add or change the category group label expression or apply the formatting directly through the label expression, as shown in Figure 4.

    Note   In category mode, the semantics of minimum, maximum, and intervals are based on the category index. For instance, setting the x-axis minimum to 2 means the first category of data will not be shown. Setting the major interval to 5 means that labels are shown only for every fifth category on the x-axis. This can be useful if the x-axis is crowded with many categories (and labels) and the underlying semantics of the categories are actually numeric.

    Note   Reporting Services 2005 also allows expressions in all the input fields shown in the X Axis and Y Axis tabs: Title, Minimum, Maximum, Major interval, Minor interval, and so on.

     


     

    -- Robert

     

Monday, March 3, 2008 5:49 AM
Moderator

All replies

  • It sounds like you are using a category axis (not a scalar DateTime axis).  The category group groups the data by week (Friday's) I suppose.  Try setting the x-axis major interval to 4, which should show labels for every 4th Friday, which is an approximation.

     

    More info: http://msdn2.microsoft.com/en-us/library/aa964128.aspx#moressrscharts_topic3

    From the whitepaper :-)

  • Category mode (the Numeric or time-scale values option is not selected)

    Based on the category group expression values, the chart control matches categories across multiple series (for example, data for the January category in the 2006 series will be in the same cluster as data for the January category in the 2007 series).

    Format string settings on the X Axis tab have no effect unless the category group expression (or label expression as in Figure 4) evaluates to a numeric or DateTime data type. Often when you use category mode, the category group expression evaluates to a string object, hence a format code applied later has no effect. You can either add or change the category group label expression or apply the formatting directly through the label expression, as shown in Figure 4.

    Note   In category mode, the semantics of minimum, maximum, and intervals are based on the category index. For instance, setting the x-axis minimum to 2 means the first category of data will not be shown. Setting the major interval to 5 means that labels are shown only for every fifth category on the x-axis. This can be useful if the x-axis is crowded with many categories (and labels) and the underlying semantics of the categories are actually numeric.

    Note   Reporting Services 2005 also allows expressions in all the input fields shown in the X Axis and Y Axis tabs: Title, Minimum, Maximum, Major interval, Minor interval, and so on.

     


     

    -- Robert

     

Monday, March 3, 2008 5:49 AM
Moderator
  • Thanks!

    That was a good answer for me

     

    Monday, March 3, 2008 7:22 PM
  • For the SQL Server reporting services the article that you have given answers. What about for Crystal Reports for .Net. Since I use Crystal reports, you please give the solution. Its very urgent!

     

    Waiting for the reply!

     

    Thanks in Advance

    Ganesh Kumar

    Monday, May 12, 2008 12:42 PM