Author Topic: Easy Chart - Struggling With %s  (Read 5212 times)

GRiley007

  • Tadpole
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
    • Email
Easy Chart - Struggling With %s
« on: November 24, 2011, 11:04:46 PM »
Hi there,

Expect a round of beers if you can help me with this one..........

I'm trying to use a chart to show how reliable a newspaper is in terms of percentage. So at the end of each page i enter in the following code (as an example):

[easychart type="horizbarstack" height="50" width="200" title="Reliability Rating %" groupnames="Correct, Incorrect" valuenames="Tom Smith, Washington Post" group1values="5,12" group2values="95,88"]

Now that would normally be great, however i have to manually edit the group1values and group2values to get it to total to 100.

What i would like if at all possible, is to enter group1data and the group2data and have it display the chart as a percentage automatically.

So if Tom Smith had accomplished 2 out of 40 and the Washington Post 12 out of 100, it would display a horisbarstack with the percentages above, but the data in this sentence.

Hope that makes sense and that it is possible!

(Or maybe a different chart is possible? It's just the horisbarstack is exactly what i envisioned.)

Gavin

doug@dyerware.com

  • Administrator
  • Sr. Member
  • *****
  • Posts: 456
  • Karma: +15/-0
    • View Profile
    • Email
Re: Easy Chart - Struggling With %s
« Reply #1 on: November 26, 2011, 12:49:24 PM »
yeah I see your dilemma and what you are trying to do.  This does not currently work in the 2.0 beta (the overlap chart type is not yet coded) but if you are using the current public release you can hack this:

[easychart type="horizbaroverlap" height="50" width="400" title="Reliability" groupnames="Tom Smith, Washington Post," valuenames="Percentage" group1values="5" group2values="12" group3values="100" groupcolors="4D89F9,C6D9FD,00000000"]

I like your look better, but this is lower maintenance.  The trick is to use an overlap chart type and create an invisible third score of 100 by using an empty string and a transparent color.  You could hide the data table to make it cleaner still.

Note the distinction between overlap and stacked


GRiley007

  • Tadpole
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
    • Email
Re: Easy Chart - Struggling With %s
« Reply #2 on: November 28, 2011, 04:51:55 PM »
Two points....

I was using the public release and tried your idea, but it doesn't look right.

However i upgraded to the beta and hid the hide/show data box and now it's looking very nice, especially when you hover the mouse over the chart.

Is there anyway to add a % to the value of the numbers when hovering over the chart? I thought this might be possible with the currency number attribute in the main settings, but adding the % into the options doesn't seem to have done anything.

Secondly, do you have any tutorials / information on the new importcsv feature?

Thanks for your help so far.

Gavin.

doug@dyerware.com

  • Administrator
  • Sr. Member
  • *****
  • Posts: 456
  • Karma: +15/-0
    • View Profile
    • Email
Re: Easy Chart - Struggling With %s
« Reply #3 on: November 29, 2011, 01:32:33 AM »
Well, just the small writeup on that post where you download it (incidentally you may want to register for email updates on that post so you can become aware of updates, and when it goes online).

I have been busy with some iOS work and have not gotten back to the plugin but you are right about the number attribute.  First priority though is the missing overlap chart type and fix that crappy data table.  Then all of those attributes need to be brought forward.


-d

GRiley007

  • Tadpole
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
    • Email
Re: Easy Chart - Struggling With %s
« Reply #4 on: December 01, 2011, 04:12:02 PM »
I appreciate you're still really busy with iOS work, i just wonder if you could give an example as to how you'd lay out the parameters for looking up a CSV file.

I have TomSmith_WashPost.csv in the root folder of my wordpress folder, it contains the same information as the first post, i.e correct 5, incorrect 95 (in spreadsheet location b8 and b9 and c8 and c9)

However the following parameters give me the error:

"EASY CHART BUILDER import error: File not found. Make sure you specified the correct path."

[easychart type="horizbarstack" height="55" width="120" title="Reliability Rating %" importcsv="TomSmith_WashPost.csv" valuenames=""Correct, Incorrect" group1values="b8,b9" group2values="c8,c9"]

Any ideas?

PS: was gonna give feedhopper a try but can't find it in the appstore?

doug@dyerware.com

  • Administrator
  • Sr. Member
  • *****
  • Posts: 456
  • Karma: +15/-0
    • View Profile
    • Email
Re: Easy Chart - Struggling With %s
« Reply #5 on: December 03, 2011, 12:48:36 PM »
Oh sorry I didn't see your reply.

It should be back in the app store.  We pulled it for wanting to get a bug fix up that was affecting upgrading. 

Try testing it with the sample testme file from the zip to make sure everything is ok.  Put it in your wordpress folder where your wp-config.php is to start with

[easychart type="horizbar" importcsv="testme.csv"];

Easychart just tries to do a file_exists(file) on it.  You can specify a path if need be, but when opening files it defaults to the root of the install.

Things to try:
Place a copy of testme.csv up one directory, in wp-content, and in the plugin folder.  Its there somewhere dammit :)