LABKEY.vis scripts not loaded

LabKey Support Forum (Inactive)
LABKEY.vis scripts not loaded Anthony Corbett  2013-09-16 12:30
Status: Closed
 
I'm starting to look into creating custom visualizations and wanted to use LABKEY.vis to create a line graph on a wiki page. However I'm getting an error that LABKEY.vis is not a valid object.

Do I need to use LABKEY.Utils.requiresScript() to pull in all the LABKEY.vis scripts? If so, can someone please show an example. If not, can you please let me know the correct way to use this functionality.

I'm using 13.1

much appreciated,

Anthony
 
 
alanv responded:  2013-09-16 15:43
Hey Anthony,

In 13.3 this type of scenario should be easier with our export as script option for scatter/box plots. Until then you can use the file I attached as a starting point, it's a modified version of what we export in 13.3. You'll need to modify the selectRowsCallback and dependencyCallback functions, but it should be a good start. Let me know if you have any issues.

Thanks,
Alan
 
Anthony Corbett responded:  2013-09-17 06:12

Thanks Alan,

I was able to get the dependencies loaded. Can you tell me how d3 and raphel are used inside the vis libraries? Does the Plot, layer, and gemo objects all depend on both or is there a clean separation then it uses one or the other?

I'm wanting to use D3's time scale (https://github.com/mbostock/d3/wiki/Time-Scales) for plotting date based data and wanted to know if it would be something as simple as using that this date based scale object in plot.

Thanks,

Anthony
 
adam responded:  2013-09-17 11:30
FYI: If you're interested in plotting date-based data, you might also want to look at the Timeline module, which integrates study data with Simile Timeline (http://www.simile-widgets.org/timeline/)

Adam