Exporting svg chart programmatically? | ThingSpeak Plugins | Forum

Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Exporting svg chart programmatically?
No permission to create posts
February 4, 2015
4:28 am
Avatar
chrisjmears

Gold
Members
Forum Posts: 54
Member Since:
April 26, 2013
sp_UserOfflineSmall Offline

Hi,

I am using the excellent multi axis chart. I have developed a web app in javascript. What I would like to do is programatically call a url which returns an svg version of the highchart so i can include this in my app.

From reading the documentation it seems to support a method for getSVG (Object additionalOptions) but I cant for the life of me figure out how I would use it to do the above.

Any assistance would be appreciated

Kind Regards

Chris

February 4, 2015
8:43 am
Avatar
lee

Admin
Forum Posts: 457
Member Since:
March 14, 2011
sp_UserOfflineSmall Offline

Hi Chris,

I can't think of a way that you'd be able to serve the result of getSVG directly via a URL call, since it requires the client to be running JavaScript in a browser.

The closest thing that I can think of would be to have a web browser always open that dynamically loads the chart, use JavaScript to get the SVG string and post it to a database, and then create an API that pulls the string from the database.

lee

February 4, 2015
10:42 am
Avatar
chrisjmears

Gold
Members
Forum Posts: 54
Member Since:
April 26, 2013
sp_UserOfflineSmall Offline

Hi,

Interestingly it looks like its something which highcharts have already implemented

http://www.highcharts.com/component/content/article/2-articles/news/52-serverside-generated-charts

February 5, 2015
4:47 am
Avatar
chrisjmears

Gold
Members
Forum Posts: 54
Member Since:
April 26, 2013
sp_UserOfflineSmall Offline

If anyone can help turn that into some code which generates i can use with processing that would be excellent

I use requestimage(image path)

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online:
22 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 261

Vinod: 196

piajola: 85

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

Newest Members:

BarryMaync, ThomasRougs, DonaldGen, prince, JrGordon, Elamsweems

Administrators: Hans: 387, lee: 457