Chart Scale

Posted on 2004-04-20
Last Modified: 2013-12-24
Good morning,
  I am having a problem with chart scale...

We have a range of customers that are all the way from large ($300,000) per month to very small ($100) per month.

Executives look up sales and I have a form that is WORKING very well...the data is returned and the chart is attractive.  But the small customer charts look like there are "bumps" instead of and real data.

I'm sure I have to do something with the "scale to" section but can't figure it out.

My code is below.  I'm sure you can guess the results if a customer has $25 max in any one month. I need this resolved quickly...I'd like to go live for all executives without "explanations."  A perfect solution would be for them to have the option of scaling or not.

xAxisTitle="Sales By Month - Last 4 Years"

<cfchartseries type="bar"
seriesLabel="Current Year" seriescolor="33FF33">
<cfchartData item="Jan" value="#chart_2004.Jan#">      
<cfchartData item="Feb" value="#chart_2004.Feb#">      
<cfchartData item="Mar" value="#chart_2004.Mar#">      
<cfchartData item="Apr" value="#chart_2004.Apr#">      
<cfchartData item="May" value="#chart_2004.May#">      
<cfchartData item="Jun" value="#chart_2004.Jun#">      
<cfchartData item="Jul" value="#chart_2004.Jul#">      
<cfchartData item="Aug" value="#chart_2004.Aug#">      
<cfchartData item="Sept" value="#chart_2004.Sept#">
<cfchartData item="Oct" value="#chart_2004.Oct#">            
<cfchartData item="Nov" value="#chart_2004.Nov#">      
<cfchartData item="Dec" value="#chart_2004.Dec#">      
<cfchartseries type="bar"
seriesLabel="2003" seriescolor="FF9933">
<cfchartData item="Jan" value="#chart_2003.Jan#">      
<cfchartData item="Feb" value="#chart_2003.Feb#">      
<cfchartData item="Mar" value="#chart_2003.Mar#">      
<cfchartData item="Apr" value="#chart_2003.Apr#">      
<cfchartData item="May" value="#chart_2003.May#">      
<cfchartData item="Jun" value="#chart_2003.Jun#">      
<cfchartData item="Jul" value="#chart_2003.Jul#">      
<cfchartData item="Aug" value="#chart_2003.Aug#">      
<cfchartData item="Sept" value="#chart_2003.Sept#">
<cfchartData item="Oct" value="#chart_2003.Oct#">            
<cfchartData item="Nov" value="#chart_2003.Nov#">      
<cfchartData item="Dec" value="#chart_2003.Dec#">
Question by:lrbrister
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 35

Expert Comment

ID: 10873370
what about pulling the max amount and sending that as a variable to the scaleTo attribute?

So if you knew that the max amount for a customer was $25 then you would send $25 to the scaleTo field instead of hardcoding in the 300000

Author Comment

ID: 10873408
To mrichmon

Could you give me an example of that in the code above
LVL 35

Accepted Solution

mrichmon earned 500 total points
ID: 10873435
Well I assume that you have a query that pulls the maximum amount correct?  It is hard to say with only the code you have shown....    Or at least you could write one?

Something like this :

<cfquery datasource="mydsn" name="GetMax">
SELECT MAX(amount) as maxvalue from mytable

Then you could use the value in the scaleTo

xAxisTitle="Sales By Month - Last 4 Years"

Author Comment

ID: 10873450
Great!  That's the ticket.  Thanks...points being awarded now.

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : All lightning effects with instructions : http://www.mediaf…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question