[Xerte-dev] Re: Charting Library

Julian Tenney Julian.Tenney at nottingham.ac.uk
Fri May 17 10:30:56 BST 2013


You can do if (xmlString.indexOf('.mp4') != -1). That's fast enough.

-----Original Message-----
From: xerte-dev-bounces at lists.nottingham.ac.uk [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Smith, John
Sent: 17 May 2013 10:26
To: For Xerte technical developers
Subject: [Xerte-dev] Re: Charting Library

Might be better to do it based on the page types included, could probably be done by regexp.. for example you might want to provide a download link (within a text field) to an .mp4. Otherwise you'd have to parse the xml which would increase the time further.

This is part of my point about sticking to only xml. If save.php could write a compatible json object then we could skip a lot of the parsing. We could even parse it at save time and include a option then?

John

Sent from Samsung tablet



-------- Original message --------
From: Julian Tenney <Julian.Tenney at nottingham.ac.uk>
Date: 17/05/2013 08:49 (GMT+00:00)
To: For Xerte technical developers <xerte-dev at lists.nottingham.ac.uk>
Subject: [Xerte-dev] Re: Charting Library


no, this is loading scripts you need for your piece (because you have added them to the list, you must need them)

You’re thinking of the Maths and Mediaelement stuff I think, which, yes, loads every time.

It’s probably not so hard to search for mp4 flv `` in the file and load those libraries as appropriate.

From: xerte-dev-bounces at lists.nottingham.ac.uk [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Pat @ Pgogy
Sent: 17 May 2013 09:20
To: For Xerte technical developers
Subject: [Xerte-dev] Re: Charting Library

Ok, but that's loading the scripts even if not needed? So not on actually demand but possible demand?

On 17 May 2013, at 08:33, Julian Tenney <Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk>> wrote:
I think that’s why I added that lsit to the LO root icon, so they could be loaded before parsing the content. Maybe we should add that to the other template as well?

From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Pat @ Pgogy
Sent: 16 May 2013 16:42
To: For Xerte technical developers
Subject: [Xerte-dev] Re: Charting Library

Well I develop new page scriptygoodness

How do I make sure XOT loads my script for my page?

On 16 May 2013, at 15:45, Julian Tenney <Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk>> wrote:
What do you mean?

From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Pat @ Pgogy
Sent: 16 May 2013 13:31
To: For Xerte technical developers
Subject: [Xerte-dev] Re: Charting Library

Kinda prefer the dynamic loading option in terms of expansion and development

On 16 May 2013, at 12:47, "Smith, John" <J.J.Smith at gcu.ac.uk<mailto:J.J.Smith at gcu.ac.uk>> wrote:
Looks good…

Regards,

John Smith
Learning Technologist
School of Health & Life Sciences
Glasgow Caledonian University

From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: Thursday, May 16, 2013 12:39 PM
To: For Xerte technical developers
Subject: [Xerte-dev] Re: Charting Library

I’ve added a list on the LO icon where you can add the libraries you want, also a stylesheet, so then you can easily define  <div id=”chart” class=”ChartClass”/> in the piece by hand, and use script to set it up:

<image001.png>

<image002.png>

<image003.png>

From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Smith, John
Sent: 16 May 2013 12:02
To: For Xerte technical developers
Subject: [Xerte-dev] Re: Charting Library

That would be fine – I thought this was more for end users

Have a dropdown with the libraries prepopulated and for each supported one, an array or sources for fallback. If you get a 200 you move on, if you get something else you try the next in the array…

Regards,

John Smith
Learning Technologist
School of Health & Life Sciences
Glasgow Caledonian University

From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: Thursday, May 16, 2013 9:25 AM
To: For Xerte technical developers
Subject: [Xerte-dev] Re: Charting Library


You can also do it this way and execute the callback when the script has loaded to use it.



<image004.png>



-----Original Message-----
From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Smith, John
Sent: 16 May 2013 07:28
To: xerte-dev at lists.nottingham.ac.uk<mailto:xerte-dev at lists.nottingham.ac.uk>
Subject: [Xerte-dev] Re: Charting Library



D3 is probably the ultimate in charting tools and is HUGE i agree but a lot of that is the data manipulation routines, cross browser, legacy browser support stuff... Don't we potentially want all them too?



Making it a jquery plugin doesn't actually have that much overhead but i think they could/should further split the sections into sub plugins so that you can pick and choose which you require...



Its only 135kb minified though - not much or any bigger than 1 decent sized image - what we need to do in xenith is enable on-demand loading/background pre-fetching of these libraries i think and then there isn't an issue...



See here though for others http://techslides.com/50-javascript-charting-and-graphics-libraries/



I was actually wondering whether we should just make the editor code into jquery plugins which leverage the power of jquery chaining and oop in a sense, so something like:



$('#treemenu :nth-child(6)').insertBranch('...').bind('click', function().... Etc



Easy to do, maintain and read...



Regards



John Smith

Learning Technologist

School of Health and Life Sciences



Sent from Samsung Galaxy SII







"Pat @ Pgogy" <xerte at pgogywebstuff.com<mailto:xerte at pgogywebstuff.com>> wrote:





It is a plugin, but you could link the raw GitHub stuff to save space.



I think the jquery in XOT could be moved into a library into which D3 could be added



I've got two D3 plugins half developed, but I've just bundled the JS in



On 15 May 2013, at 15:44, Julian Tenney <Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk%3cmailto:Julian.Tenney at nottingham.ac.uk>>> wrote:



There are some really nice examples on their site. I think it’s abit more than I need: it seems to be a whole jquery like plugin, rather than just the charting stuff.



This is one example where being to load libraries from a CDN would be good, because then people can choose. I don’t know if you can make the charting setup FWS for anything but the simplest charts, which we already have.



After equations though, academics would make a lot of use of charts. I suppose they can do them as images, but it’s a bit of a hassle.



From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk%3cmailto:xerte-dev-bounces at lists.nottingham.ac.uk>> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Pat @ Pgogy

Sent: 15 May 2013 15:33

To: For Xerte technical developers

Subject: [Xerte-dev] Re: Charting Library



D3 is pretty standard and jquery like



On 15 May 2013, at 15:17, Julian Tenney <Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk%3cmailto:Julian.Tenney at nottingham.ac.uk>>> wrote:

The ability to show a range of charts would be a good addition to the site template, and the toolkit, it would complement the MathJax stuff nicely.



Does anyone have any recommendations?





_______________________________________________

Xerte-dev mailing list

Xerte-dev at lists.nottingham.ac.uk<mailto:Xerte-dev at lists.nottingham.ac.uk<mailto:Xerte-dev at lists.nottingham.ac.uk%3cmailto:Xerte-dev at lists.nottingham.ac.uk>>

http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev

_______________________________________________

Xerte-dev mailing list

Xerte-dev at lists.nottingham.ac.uk<mailto:Xerte-dev at lists.nottingham.ac.uk<mailto:Xerte-dev at lists.nottingham.ac.uk%3cmailto:Xerte-dev at lists.nottingham.ac.uk>>

http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev









Glasgow Caledonian University is a registered Scottish charity, number SC021474



Winner: Times Higher Education’s Widening Participation Initiative of the Year 2009 and Herald Society’s Education Initiative of the Year 2009.

http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html



Winner: Times Higher Education’s Outstanding Support for Early Career Researchers of the Year 2010, GCU as a lead with Universities Scotland partners.

http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html

_______________________________________________

Xerte-dev mailing list

Xerte-dev at lists.nottingham.ac.uk<mailto:Xerte-dev at lists.nottingham.ac.uk>

http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev

Glasgow Caledonian University is a registered Scottish charity, number SC021474

Winner: Times Higher Education’s Widening Participation Initiative of the Year 2009 and Herald Society’s Education Initiative of the Year 2009.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html

Winner: Times Higher Education’s Outstanding Support for Early Career Researchers of the Year 2010, GCU as a lead with Universities Scotland partners.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html

Glasgow Caledonian University is a registered Scottish charity, number SC021474

Winner: Times Higher Education’s Widening Participation Initiative of the Year 2009 and Herald Society’s Education Initiative of the Year 2009.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html

Winner: Times Higher Education’s Outstanding Support for Early Career Researchers of the Year 2010, GCU as a lead with Universities Scotland partners.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html
_______________________________________________
Xerte-dev mailing list
Xerte-dev at lists.nottingham.ac.uk<mailto:Xerte-dev at lists.nottingham.ac.uk>
http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
_______________________________________________
Xerte-dev mailing list
Xerte-dev at lists.nottingham.ac.uk<mailto:Xerte-dev at lists.nottingham.ac.uk>
http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
_______________________________________________
Xerte-dev mailing list
Xerte-dev at lists.nottingham.ac.uk<mailto:Xerte-dev at lists.nottingham.ac.uk>
http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev

Glasgow Caledonian University is a registered Scottish charity, number SC021474

Winner: Times Higher Education’s Widening Participation Initiative of the Year 2009 and Herald Society’s Education Initiative of the Year 2009.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html

Winner: Times Higher Education’s Outstanding Support for Early Career Researchers of the Year 2010, GCU as a lead with Universities Scotland partners.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html
_______________________________________________
Xerte-dev mailing list
Xerte-dev at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev


More information about the Xerte-dev mailing list