Showing posts with label axis. Show all posts
Showing posts with label axis. Show all posts

Monday, March 19, 2012

Force chart to display all x axis labels

I have an xy scatter chart that plots computer outages versus days of the
month. Is there a way to force the chart to show all x axis labels? eg. for
the month of May I want the x axis to show all 31 labels and associated tick
marks (1-May through to 31-May).
Currently the chart only displays every third label. eg 1-May, 4-May, 7-May
etc.
Regards
MartinWhile playing around with this I have found some strange chart behaviour.
On the x axis I am plotting datetime values from a SQL stored proc. The x
axis chart properties are setup with a format code of dd-MMM-yyyy and the
'Numeric or time-scale values' checkbox checked. With these properties set
the chart only displays every third x axis label (1-May-2005, 4-May-2005
etc).
If I uncheck 'Numeric or time-scale values' and then view the chart I see 31
labels on the x axis but on the days that contain NULL y-axis data, the x
axis label is displayed as dd-MMM-yyyy!
Any ideas how to fix this?
"Martin Hinchy" wrote:
> I have an xy scatter chart that plots computer outages versus days of the
> month. Is there a way to force the chart to show all x axis labels? eg. for
> the month of May I want the x axis to show all 31 labels and associated tick
> marks (1-May through to 31-May).
> Currently the chart only displays every third label. eg 1-May, 4-May, 7-May
> etc.
> Regards
> Martin
>|||Got all dates on x-axis to display by checking the 'Numeric or time-scale
values' checkbox and specifying the x-axis major gridline interval as 1.
Now found another problem. If my dataset returns three values for the one
day then only the first value is plotted. Anyone know why?
"Martin Hinchy" wrote:
> While playing around with this I have found some strange chart behaviour.
> On the x axis I am plotting datetime values from a SQL stored proc. The x
> axis chart properties are setup with a format code of dd-MMM-yyyy and the
> 'Numeric or time-scale values' checkbox checked. With these properties set
> the chart only displays every third x axis label (1-May-2005, 4-May-2005
> etc).
> If I uncheck 'Numeric or time-scale values' and then view the chart I see 31
> labels on the x axis but on the days that contain NULL y-axis data, the x
> axis label is displayed as dd-MMM-yyyy!
> Any ideas how to fix this?
> "Martin Hinchy" wrote:
> > I have an xy scatter chart that plots computer outages versus days of the
> > month. Is there a way to force the chart to show all x axis labels? eg. for
> > the month of May I want the x axis to show all 31 labels and associated tick
> > marks (1-May through to 31-May).
> >
> > Currently the chart only displays every third label. eg 1-May, 4-May, 7-May
> > etc.
> >
> > Regards
> > Martin
> >
> >

Force all months along X axis when some months missing data

Hi,
I want to display numeric information by month in a column chart. The
data does not have records for every month. I can't seem to display
all months along the x axis while still using month names instead of
month numbers.
My current chart setup is as follows:
Data > Category group
Name: MonthCategory
Group on (Expression): =Month(Fields!AcceptedDate.Value)
Label: =Fields!AcceptedDate.Value
X Axis
Show labels: <true>
Format Code: MMM
Scale Minimum: 1
Scale Maximum: 12
With this configuration, I get x axis labels for the months that have
data, but the months with no data are skipped.
If I turn on "Numeric or time-scale values", I get all 12 months, but
they are displayed as the literal string "MMM". It seems that the
"Numeric or time-scale values" setting won't allow the labels to
display anything other than numeric values.
Any suggestions?
Thanks in advance,
EricHey Eric,
Can your Format: be an expression? If so you may be able to try
=Choose(xValue, "january", "february","march",etc...) for the 12 months.
Michael C
"Eric" wrote:
> Hi,
> I want to display numeric information by month in a column chart. The
> data does not have records for every month. I can't seem to display
> all months along the x axis while still using month names instead of
> month numbers.
> My current chart setup is as follows:
> Data > Category group
> Name: MonthCategory
> Group on (Expression): =Month(Fields!AcceptedDate.Value)
> Label: =Fields!AcceptedDate.Value
> X Axis
> Show labels: <true>
> Format Code: MMM
> Scale Minimum: 1
> Scale Maximum: 12
> With this configuration, I get x axis labels for the months that have
> data, but the months with no data are skipped.
> If I turn on "Numeric or time-scale values", I get all 12 months, but
> they are displayed as the literal string "MMM". It seems that the
> "Numeric or time-scale values" setting won't allow the labels to
> display anything other than numeric values.
> Any suggestions?
> Thanks in advance,
> Eric
>|||That's close Michael. Though when I use:
=choose(month(Fields!AcceptedDate.Value), "Jan", "Feb", "Mar",
"Apr"...)
I get "Jan" listed for every month.
On Jul 25, 5:28 pm, Michael C <Micha...@.discussions.microsoft.com>
wrote:
> Hey Eric,
> Can your Format: be an expression? If so you may be able to try
> =Choose(xValue, "january", "february","march",etc...) for the 12 months.
> Michael C
>
> "Eric" wrote:
> > Hi,
> > I want to display numeric information by month in a column chart. The
> > data does not have records for every month. I can't seem to display
> > all months along the x axis while still using month names instead of
> > month numbers.
> > My current chart setup is as follows:
> > Data > Category group
> > Name: MonthCategory
> > Group on (Expression): =Month(Fields!AcceptedDate.Value)
> > Label: =Fields!AcceptedDate.Value
> > X Axis
> > Show labels: <true>
> > Format Code: MMM
> > Scale Minimum: 1
> > Scale Maximum: 12
> > With this configuration, I get x axis labels for the months that have
> > data, but the months with no data are skipped.
> > If I turn on "Numeric or time-scale values", I get all 12 months, but
> > they are displayed as the literal string "MMM". It seems that the
> > "Numeric or time-scale values" setting won't allow the labels to
> > display anything other than numeric values.
> > Any suggestions?
> > Thanks in advance,
> > Eric- Hide quoted text -
> - Show quoted text -

Monday, March 12, 2012

Foramtting chart axis colour using expression

I have a chart on a report that shows value in £ on the Y Axis. The values can be both positive and negative. I would like to have the negative labels to show in red and the positive in black. What is the expression syntax to achieve this? i know it will be an IIF statement, but what is the syntax to show the Y Axis label as <0?

eg if i was doing this for a field it would be iif(Field!Fieldname.value <0, "RED","BLACK") but what would i replace the FIELD!Fieldname.vaue with so the expression would change the Y Axis label.


Thanks in advance for any help

Dave Munro

Hi Dave,

I'm a brazillian guy, but i try to help you !

First of all, You will have to create a code to fill the bars.

REPORT - REPORT PROPERTIES - CODE (tab)

Function ColorBar(VlField) As String
Dim Bar_Colour as String
if VlField > 0 then
Bar_Colour = "BLACK"
Else
Bar_Colour = "RED"
End if

Return Bar_Colour

Afther that, click in chart and set the properties.

click in TAB (VALUES) - VALUE - edit - Appearance (Tab) - Series Style - Fill - expression (color)

=code.ColorBar(Fields!XXXXXX.Value)

OK....

Bye,

Nitrini

Foramtting chart axis colour using expression

I have a chart on a report that shows value in £ on the Y Axis. The values can be both positive and negative. I would like to have the negative labels to show in red and the positive in black. What is the expression syntax to achieve this? i know it will be an IIF statement, but what is the syntax to show the Y Axis label as <0?

eg if i was doing this for a field it would be iif(Field!Fieldname.value <0, "RED","BLACK") but what would i replace the FIELD!Fieldname.vaue with so the expression would change the Y Axis label.


Thanks in advance for any help

Dave Munro

Hi Dave,

I'm a brazillian guy, but i try to help you !

First of all, You will have to create a code to fill the bars.

REPORT - REPORT PROPERTIES - CODE (tab)

Function ColorBar(VlField) As String
Dim Bar_Colour as String
if VlField > 0 then
Bar_Colour = "BLACK"
Else
Bar_Colour = "RED"
End if

Return Bar_Colour

Afther that, click in chart and set the properties.

click in TAB (VALUES) - VALUE - edit - Appearance (Tab) - Series Style - Fill - expression (color)

=code.ColorBar(Fields!XXXXXX.Value)

OK....

Bye,

Nitrini