Highchart, updating spider web chart - highcharts

I'm using Highchart web chart. When I run it first time, it works well. Second time I run it by retrieving data from the backend using different parameters, but I get a strange error.
Any ideas? Looks like there's something wrong with destroying the element??

Related

Making charts on phonegap using data from external website

so i need to develop an app using phonegap that creates a graphical display of solar wind data (exciting stuff i know...) from this website http://services.swpc.noaa.gov/text/ace-swepam.txt with a graph being made for 'ion temperature', 'bulk speed' and 'proton denisity' individually, however im clueless as to where to begin... im assuming i need to make use of the charts.js library or something similar, im assuming i can make a variable for the axis as the data will be changing over time but I'm more stuck on how to pull data from this website though to be included in my charts. Any info on this would be greatly appreciated!
Thanks,
Gerrit
Call the web service to get the data, then pass it to the charting library you're using. You'll use AJAX (XMLHTTPRequest) to get the data. There's all sorts of options out there for simplifying this (jQuery and other libraries make AJAX easy).
The service you're using is giving you the data as a text file - this can work, but you'll have to parse the data client-side which is not fun (or a good use of your phone's capabilities). Look for a service that returns the data as a JSON object, then you'll have the data in a format that can be more easily passed to the charting library.

bloodhound not showing all data returned from remote call typeahead.js

I'm using typeahed.js and bloodhound.js (with an mvc wrapper) and my remote server call is retrieving data based on details typed into a textbox.
For example, I type 'Fr' and I get three companies that start with Fr. I've checked the serverside code (c#) and I get 3 results. I've used Fiddler and checked that the browser is receiving (3 Json records) yet the typeahead suggestion only shows 2 items.
The limit in bloodhound is set to 1000 and I've switched caching off. Is this a known issue with these js libraries ?
Its basically unusable since I'm not getting an accurate representation of my actual search. I'm using the latest versions (twitter.typeahead v 0.11.11 and the version of bloodhound that's packaged with typeahead). I've spent so much time trying to figure out whats wrong with this, but I've had no luck.
I really don't want to have to rewrite parts of my app to use a different autocomplete mechanism. Is there a fix for this ?

A way to generate highcharts dynamically (including web page) in JS?

I am interested in optimizing my chart pool. On my internal server; I have about 15 charts that has to go each in their own page. This means to have to change 15 times something, if I have to.
I tried to put all the common code in a single js script, so the web page has minimum code in it, but still, I need to maintain plenty of pages.
Is there a more efficient way to maintain multiple charts, that live on different pages? Ideally I would have a single page, where I use links to make new charts. I would call this function and it will generate the webpage to host the chart and the appropriate code to build the chart itself (which takes data from external files). Is JS the right tool for this job, or do I need to use something else?
I don't need anything complicate, just something that can reduce the amount of work done to maintain (and upgrade), multiple charts. Any pointer is appreciated, since I just started with webpages, CSS and such.
I would put it on a single page and use a query string parameter to decide which chart to create. I would then make the source data for the chart respect the parameter and bind correctly to the chart.
You url could be something like this: chartpage.html?chartId=1

how to reload a graph to show updated data each time the column in database gets updated

I am using chart-kick to generate graphs in my Ruby on Rails application. I am able to display the charts without any problem. The issue is I am in need to refresh the page which has the graph each time the data is added to see the updated graph. How do I make sure that the graph alone reloads everytime I update new data in my database? Is that possible?
Note: Highcharts is not an option. I am giving this to a commercial website and they can't afford Highcharts.
I ended up using Chart.js and using Ajax requests to poll the database and update the graph for its changes. I was not successfull in implementing Websockets.
To achieve what you want, you need a bidirectional communication between your server and your client.
I will suggest you to use websockets, it suffers from not being supported by all browsers but as fallback you can use polling the server for new results (if you care enough for a fallback). To check the current support status check this page.
Follow this example on websocket-rails gem to get started.
I would use something like pusher its for doing exactly what you need.
Use turbolinks for reload graph

(Rails, Flash) Why would my updated Flash chart not be refreshing in Internet Explorer?

I've got a bit of an odd issue here. Basically it only occurs in IE. Safari, Firefox, and Opera work just fine.
FYI, I am using XMLCharts (http://www.maani.us/xml_charts/) to display chart data. Basically I have a library that generates up-to-the-minute data on the fly based on selected date ranges. Well, for whatever reason, IE refuses to show the updated chart after changing the date range. I've confirmed that the server is actually generating the renewed data in the background (as I can see the raw data file that is output), but IE seems to cache the previous Flash chart for display instead of displaying a fresh one.
For the record, I am keeping the name of the chart the same between refreshes, so that may be part of the IE issue. Still, the other browsers refresh and show up-to-date info as necessary, I'm not sure why IE doesn't display the chart with the updated data.
Any ideas? Can I force a refresh of some sort?
Best.
I don't know the library, but most of the flash charts libraries use an XML or JSON data file, and loading them trough http request. Try adding a random parameter to the url of the data file, for example: instead of "/data.xml" try "/data.xml?tmp=327932423487"

Resources