Almost finished, but my conceal effect isn't working :(


« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by mike on 20th January 2014
Hi, got an example below - my reveal effect isn't firing at all. I've loaded it into a function that fires my chart draw as a callback - the callback is firing (the hide event is also button clicks and whatnot).

example here : adpg.com/mike/demos/test.html

If the code and logic are a mess, it's because this is my first time ever doing any real scripting.
Posted by mike on 20th January 2014
also, i can't see tooltips at all. Not a bit. Maybe you can spot why I suck, or if there's a problem.
Posted by mike on 21st January 2014
That said, tooltips are also not working at all on this canvas either. Not by hook or crook.

:(

Mike
Posted by mike on 21st January 2014
and fixed the tooltips. Hope you can help with conceal/reveal :)
M
Posted by Richard on 21st January 2014
Hi there,

First off - fix jQuery. It seems to need including first (before the plugins). And tooltips seemed to be fine. The only issue I could find was when you clicked the buttons the animations seemed a bit screwy. I would suggest that you take them out.

Aslo, instead of over-engineering it - I would suggest a structure like this:

var obj = null;
var canvas = document.getElementById('cvs');

function ShowLine1 ()
{
     RGraph.Effects.jQuery.Conceal(obj);
     RGraph.Reset(canvas);

     // Show chart...
     obj = ...
}

function ShowLine2 ()
{
     RGraph.Effects.jQuery.Conceal(obj);
     RGraph.Reset(canvas);

     // Show chart...
     obj = ...
}

function ShowLine3 ()
{
     RGraph.Effects.jQuery.Conceal(obj);
     RGraph.Reset(canvas);

     // Show chart...
     obj = ...
}



Richard, RGraph Support
www.rgraph.net
Please link to the RGraph website
Posted by Mike on 21st January 2014
My inexperience is showing - I half implemented your suggestion, but was successful, mostly. My issue now is that while I was able to get a transition effect to work across nine bar charts without so many if and therefore etc scenarios, I can't seem to get it to load my CSV file data chart.

In my example, www.adpg.com/mike/test3.html - if you click on choice 2 it should be loading the csv reader bar I've taken from your demo (using my data).

I'm not sure what I'm doing wrong, but if I could nail this part, we'd be in business pretty much. I will be switching the effect and playing with the details, but this would solve my technical hurdles.

Any advice would be appreciated.
Posted by Richard on 22nd January 2014
Hi there,

The link doesn't work - but the docs for the CSV reader are here:

www.rgraph.net/docs/csv-file-reader.html

Or you could use the RGraph AJAX function:

RGraph.AJAX.getCSV('/foo.php', function (data)
{
     // Create chart here
});






Richard, RGraph Support
www.rgraph.net
Please link to the RGraph website

Add a reply

 




« Back to message list
RGraph on social media