Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Services / Reporting Services / October 2005

Tip: Looking for answers? Try searching our database.

font color inside bar graph

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
chalexan - 26 Oct 2005 17:12 GMT
Is there a way to change the point lable color of the font if it's inside of
the chart beside a bar?  I have a chart that shows the percentage of disk
space free.  Once the chart gets less that 25% it runs out of room to put the
point lable percentage beside the bar so it puts it on the bar.  The bar is
blue and the font is black, so it's hard to see the font inside the bar.

Thanks.
Robert Bruckner [MSFT] - 27 Oct 2005 04:10 GMT
Sorry, you can't determine the font color of the label dynamically based on
the final label drawing position in relation to the bar.
The closest you can get is to not use "auto-positioning" of the datapoint
label, but always use a fixed position (e.g. to the right of the bar).

-- Robert
Signature

This posting is provided "AS IS" with no warranties, and confers no rights.


> Is there a way to change the point lable color of the font if it's inside
> of
[quoted text clipped - 6 lines]
>
> Thanks.
chalexan - 28 Oct 2005 20:43 GMT
Robert,

I had another post on this forum about "Formatting a string from the code"
and Bret replied by saying that I could use an IIf condition to format my
string.  Come to find out that inside my graph properties (Data -> Edit
Values -> Point Labels -> Label Style... -> Color: fx) I was able to change
the color by using the expression =IIf( Fields!FreeSpace.Value <
4000,"White","Black").  This was what I was trying to do.  

Thanks for your reply.

--Chad
Robert Bruckner [MSFT] - 28 Oct 2005 22:46 GMT
Sorry, then I misunderstood. I thought you had the issue that you want the
font color to be blue when the label is drawn outside the bar and a
different color when drawn inside. I'm glad you could solve your
requirements.

-- Robert
Signature

This posting is provided "AS IS" with no warranties, and confers no rights.


> Robert,
>
[quoted text clipped - 9 lines]
>
> --Chad
chalexan - 31 Oct 2005 01:29 GMT
Robert,

Maybe I misunderstood your reply to my last post, but I just wanted to be a
little clearer on what I did.

I've got a bar chart that uses point labels inside the bar chart.  When the
bar is short, the point label prints beside the bar, but when the bar is too
long it forces the point label to print on the bar itself.  

I really have three values: Total disk space, used disk space, and free disk
space.  Building the chart, I used Total disk space and used disk space.  And
I left the remaining white space to indicate the free disk space.  I used the
pint label to print the amount of free space inside the chart, but I noticed
that when the free space was less than 4000, there wasn't enough of room to
print the amout of free space beside the bar, so it automatically prints the
label on the bar itself.  

After getting to reply from Bret, I tried using the expression =IIf(
Fields!FreeSpace.Value < 4000,"White","Black") in the labels style color to
change the label's font color to white if the free space is less than 4000
else change it to black.  Come to find out that most of the properties have
an expression... field that lets you add this condition statement to choose
between two values.  For example, I also changed the font size the same way
=IIf( Fields!FreeSpace.Value < 4000,"9pt","8pt") because the white characters
didn't show up as good as the black so I made it a little bigger.

Sorry if I misunderstood your response, but I just want to reiterate what I
did.  I'm having a hard time finding documentation on RS and this forum is a
great resource.  Finding out that I can use this condition to change
properties adds a lot of flexibility but it also makes me ask what other
kinds of conditions or functions are there that I don't know about.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.