Sol Web Solutions Blog

Sol Web Solutions Blog is aimed to help, inform, educate and enable our site visitors.

  • Home
    Home This is where you can find all the blog posts throughout the site.
  • Categories
    Categories Displays a list of categories from this blog.
  • Tags
    Tags Displays a list of tags that have been used in the blog.
  • Login
    Login Login form

Line chart series to start at 0

Posted by on in Reporting
  • Font size: Larger Smaller
  • Hits: 8759
  • 0 Comments
  • Subscribe to this entry
  • Print

I have a line chart series that is for accounting.  A sample query would pull back 12 rows (1 row for each month, Jan - December), and the columns would show the dollar amounts for separate buckets of money allocations.  What I'm trying to do is have the series chart line start @ 0 (we're trying to mimic another chart that does the same thing).

Resolution was reached with the help of a "Periods" look-up table that I created.

My main table, which showed the 12 monthly periods, had one column which was a long date-time field.  I took that and got the monthname(). 

With this new look-up child table, I defined an int column ("PKID") from 0-12 (...yes, 13 values/rows) to get the ordering I wanted along with a second column of the month name.  For int values 0 and 1, I applied this to the first month, so for January, I had two rows.

For my series lines, I had to do an expression that said if the int value of PKID in the look-up table was 0, then the value for the line was 0...hence, I got the lines to start at x,y of 0.

From the customers point of view, the January series line looked like it started from 01/31 in the beginning when the report was first developed w/o this PKID field...and they wanted it to really start @ 01/01.  For the category (horizontal) axis, I made sure to turn the label off if PKID = 0.

 

0

Comments

  • No comments made yet. Be the first to submit a comment

Leave your comment

Guest
Guest Wednesday, 22 November 2017

Help Today

Send an email here!

Sol Web Solutions will be glad to help you anytime with general or technical questions, suggestions or comments.

Website Hosting

Web Hosting

Sol News

We will not share, trade, or sell any of your information in any way. Your privacy is completely respected.