Author Topic: Easy Chart inside of a widget  (Read 4349 times)

hcww

  • Tadpole
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Easy Chart inside of a widget
« on: August 30, 2012, 07:12:29 PM »
Hi there,

I am working on a client website and would like to incorporate an Easy Chart into the sidebar. I see in the documentation that it should be possible, but when I try it simply does not display. For instance the following appears blank:

[easychart type="line" height="300" width="350" title="Test Chart" groupnames="Chocolate, Vanilla, Strawberry, Mint, Peach" valuenames="1999, 2001, 2003, 2004, 2007, 2008" group1values="2069, 1184, 2389, 820, 2398, 701" group2values="2002, 1177, 2825, 697, 3226, 993" group3values="4071, 824, 505, 100, 230, 0" group4values="0, 163, 320, 145, 0, 121" group5values="0, 0, 143, 70, 565, 102"]

Was this removed in the latest version perhaps?

doug@dyerware.com

  • Administrator
  • Sr. Member
  • *****
  • Posts: 456
  • Karma: +15/-0
    • View Profile
    • Email
Re: Easy Chart inside of a widget
« Reply #1 on: August 30, 2012, 11:07:34 PM »
No, not really.  It should work with the latest WP as well.

What widget are you using?   I just paste this in the standard text widget:
[easychart type="vertbar" width="50" height="70" title="SYSMark 2007: AMD v.s.  Intel" groupnames="AMD Phenom X4 9950, Intel Core i7 940" groupcolors="005599,229944" valuenames="Overall,E-Learning,Video Creation,Productivity,3D" group1values="157,132,208,150,148" group2values="229,202,259,226,232"]

You can even put a chart inside an easyspoiler inside a widget. 

Are you getting any kind of error text in the widget?

hcww

  • Tadpole
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Easy Chart inside of a widget
« Reply #2 on: September 07, 2012, 12:13:35 AM »
Thanks for your suggestion. I tried your code and it worked fine inside page content (inside "The Loop") but when I tried to insert the short code into a widget (The Sidebar) I noticed some discrepancies when I viewed the source and with the help of winmerge.

The successful call (inside "the loop") had the following script tags that were missing from my test using a widget, namely...

MISSING
script tag calling https://www.google.com/jsapi
inline script calling google.load + the Function wpEasyChartToggle()
script tag calling http://policymonitor.ca/wp-content/plugins/easy-chart-builder/js/easy-chart-builder.js?ver=3.4.1'

Not Missing
The following appeared in both:
google.setOnLoadCallback + function easyChartDiv15198001_img

I'm not printing out the entire script block but I think you get the idea of what might be happening.

Thanks again for your help.

Best regards

doug@dyerware.com

  • Administrator
  • Sr. Member
  • *****
  • Posts: 456
  • Karma: +15/-0
    • View Profile
    • Email
Re: Easy Chart inside of a widget
« Reply #3 on: September 07, 2012, 12:19:02 AM »
thats odd.  I have it in my sidebar