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
  • 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
In a recent question ( here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

776 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