Author Topic: Easy Chart - question about line graphs  (Read 6477 times)

DrDave

  • Tadpole
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Easy Chart - question about line graphs
« on: January 28, 2012, 01:49:29 AM »
I have a line graph with 12 months of data and 2 lines.  One of the lines has all 12 data points, and the other one I wanted to add a new point each month.

I'll try to explain with an example. One line starts at 250 in January and goes down in equal increments each month until it reaches 200 in December.  The second line starts at 250, and has no data as of yet for the other months. When I tried to add a test number for February (say 246), instead of this line going down to 246 in February, it just creates one long line from 250 in January to 246 in December.

When looking at the table of data, this line has 250 in January, 246 in February, and the rest of the months say "undefined".

Is there any way to get it to show the correct line going from 250 in January to 246 in February and stopping there, while still showing the first line with all 12 months?

I hope what I'm asking is clear.  Thanks in advance for any help!

doug@dyerware.com

  • Administrator
  • Sr. Member
  • *****
  • Posts: 456
  • Karma: +15/-0
    • View Profile
    • Email
Re: Easy Chart - question about line graphs
« Reply #1 on: January 28, 2012, 02:40:30 AM »
Can you post the shortcode that you think should work?  Or at least one that mimics the example you provided?  If the source data is proprietary you can PM me or email the shortcode to support (A T) dyerware . (C O M)  and post a reply back to this thread.

Ill have a better idea of your problem looking at the chart
-d

DrDave

  • Tadpole
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Easy Chart - question about line graphs
« Reply #2 on: January 28, 2012, 04:43:59 PM »
Sure, this is what I have for a shortcode:

Code: [Select]
[easychart type="line" height="300" width="350" title="Chart Title" minaxis="180" groupnames="Goal, Progress" valuenames="Jan 1, Feb 1, Mar 1, Apr 1, May 1, Jun 1, Jul 1, Aug 1, Sep 1, Oct 1, Nov 1, Dec 1, Jan 1" group1values="250, 246.5, 242.5, 238, 233.9, 229.4, 225, 220.7, 216.2, 211.9, 207.6, 203.4, 200" group2values="250, 246"]

doug@dyerware.com

  • Administrator
  • Sr. Member
  • *****
  • Posts: 456
  • Karma: +15/-0
    • View Profile
    • Email
Re: Easy Chart - question about line graphs
« Reply #3 on: January 28, 2012, 10:00:52 PM »
Is this acceptable?  Note I had to backfill zero data...

Code: [Select]
[easychart type="line" height="300" width="350" title="Chart Title"  minaxis="180" groupnames="Goal, Progress" valuenames="Jan 1, Feb 1, Mar 1, Apr 1, May 1, Jun 1, Jul 1, Aug 1, Sep 1, Oct 1, Nov 1, Dec 1, Jan 1" group1values="250, 246.5, 242.5, 238, 233.9, 229.4, 225, 220.7, 216.2, 211.9, 207.6, 203.4, 200" group2values="250, 246, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0"]

Probably not what you want as this implies a value of '0' for missing datum.

DrDave

  • Tadpole
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Easy Chart - question about line graphs
« Reply #4 on: January 28, 2012, 11:18:11 PM »
I had thought of doing that as an option, but it doesn't look right with the drop to 0 after the last valid data point.  My preference would be to have the line stop after the last point if it were at all possible.

doug@dyerware.com

  • Administrator
  • Sr. Member
  • *****
  • Posts: 456
  • Karma: +15/-0
    • View Profile
    • Email
Re: Easy Chart - question about line graphs
« Reply #5 on: February 02, 2012, 12:12:20 AM »
here is a fix for you.  'undefined' is now the appropriate empty space.  Just drop it in and replace the existing file under the 'js' directory in the plugin directory.  Based on your caching you may have to clear cached pages to see the effect.

I am sorry it took so long to get back to you.  Thanks for finding this.
-d

raphaelmarieux

  • Tadpole
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Easy Chart - question about line graphs
« Reply #6 on: September 11, 2012, 02:17:08 PM »
Hello,
I try this solution but it the same for me the "undefined value" are in 0
I try different solution :
[easychart type="line" height="300" width="350" title="Chart Title"  minaxis="180" groupnames="Goal, Progress" valuenames="Jan 1, Feb 1, Mar 1, Apr 1, May 1, Jun 1, Jul 1, Aug 1, Sep 1, Oct 1, Nov 1, Dec 1, Jan 1" group1values="250, 246.5, 242.5, 238, 233.9, 229.4, 225, 220.7, 216.2, 211.9, 207.6, 203.4, 200" group2values="250, 246,'undefined'"]
[easychart type="line" height="300" width="350" title="Chart Title"  minaxis="180" groupnames="Goal, Progress" valuenames="Jan 1, Feb 1, Mar 1, Apr 1, May 1, Jun 1, Jul 1, Aug 1, Sep 1, Oct 1, Nov 1, Dec 1, Jan 1" group1values="250, 246.5, 242.5, 238, 233.9, 229.4, 225, 220.7, 216.2, 211.9, 207.6, 203.4, 200" group2values="250, 246,undefined"]
[easychart type="line" height="300" width="350" title="Chart Title"  minaxis="180" groupnames="Goal, Progress" valuenames="Jan 1, Feb 1, Mar 1, Apr 1, May 1, Jun 1, Jul 1, Aug 1, Sep 1, Oct 1, Nov 1, Dec 1, Jan 1" group1values="250, 246.5, 242.5, 238, 233.9, 229.4, 225, 220.7, 216.2, 211.9, 207.6, 203.4, 200" group2values="250, 246,"]
But it's the same
Can you help me please ?
Raphael

 

anything