I am working with a database that uses QuickBase... What I am trying to accomplish is making a custom graph using HighCharts.
I had someone helping me do this earlier and they told me that I would need to make an API call from QuickBase to query the data I needed. I figured that out, but they went offline and now I am once again stuck scratching my head.
So far I have managed to set up my api call which looks like this
http://pastie.org/9351447
I was told that since it returns it as XML that it would not directly be able to populate a chart from there, so I am now trying to figure out how to turn this into what I am needing it to be (JS).
So the API returns an xml data, and you need to use the xml data to Highcharts?
It seems Highcharts is capable of handling XML
http://www.highcharts.com/docs/working-with-data/preprocessing-data-from-a-file-csv-xml-json#2
So you should be able to populate your chart using the data provided by the API.
Related
I am now learning while developing my Java web app using JSF, and I was asked to study on using Javascript to create datatable/report dynamically and present it via .html/.xhtml. I am required to use Datatables.net to produce the table. The backend process is using Java instead of Php. Since it is so rare to use this method, I got no idea on this. My thought so far is:
MySQL data --convert to (processed by Java code)--> Json --read by-> Javascript
How do I process the SQL data? Can I directly run the query inside Java like:
SELECT
CONCAT("[",
GROUP_CONCAT(
CONCAT("{name:'",NAME,"'"),
CONCAT("email:'",email,"'"),
CONCAT(",address:'",address,"'}")
)
,"]") AS JSON FROM customer
If so, how do I parse the data out and make sure Javascript will read it?
The another way I found is to use some library like Gson or something similar.
Explanations or examples about this issue is much appreciated.
I have to add a button to fetch from my azure function by sending JSON GET call on an HTML page and I am new to this. Could you please give me some code examples that can help me understand this?
I am completely new to this so I need little help with this to begin I just made a webpage using html5 and I am confused after that. I just need a little example of how can I use JSON get to fetch something from my azure function.
Is it possible to be able to upload an excel document with varying ranges of data, and have that data dynamically displayed in a basic form of chart(bar, pie, etc.) on our company website.
After doing some research I figured the only two possible ways to maybe do something like this is to use a very complicated macro in VBA or a Javascript parser to read the data and display it then. The data that will eventually go in here will have sensitive information so I cannot use google charts or anything like that.
This problem has to be divided into two parts.
One -part is to gather and process the information needed to display the chart.
Second - This is the easiest, a way to display a chart in HTML. For this, you can use www.c3js.org javascript library to display the chart in HTML.
Regarding part one, it depends in which technology is built your website.
For example, If it is in php, you will need to find a library in php, which can read and parse excel files.
Then you have to create a service in your website, where the data is going to be provided. For example,
www.yourcompany.com/provideChartData.php
You can format the response as json format.
Once you have solved that, you only have to call the service from your page, and the data will be dynamically displayed. You can call it using jquery library for javascript ($.post("www.yourcompany.com/provideChartData.php",function (data) { code to display chart ....}))
There is no real easy way to do this that I have found. I have had to manually parse these things in the past but there are some libraries out there for node that might help you.
https://www.npmjs.com/package/node-xlsx
You can also export form excel as CSV. When you do this, me sure to set the custom separator to something other than ',' and you should be fine to import it into a large array and get the data/charts you need.
https://github.com/wdavidw/node-csv
Hope that helps.
I'm new to Blogger and its JSON API. I've found out I can retrieve all posts / retrieve specific post using post id.
I'm trying to build a lazy loading blogger post list page, where blog content needs to fetch dynamically. What is the best way to retrieve latest 5 posts in every request? (I don't want to request 5 times for 5 posts)
Another thing is, I want to show post's first image on post list page. How can I fetch the first image and fetch textual content only?
I've searched Google but couldn't find any good tutorial. I hope you guys can help me.
Cheers
One option is to use javascript callbacks , for example :
http://jayunit100.blogspot.com/feeds/posts/default?alt=json-in-script&callback=myFunc
This will return back a peice of executable javascript code which
1) Calls a function which you defined
2) Sends that function a json object
The below is my speculation on this matter, because it clearly is much more difficult than one might think it should be:
It is not clear to me why a simpler, pure, authentication-free JSON REST api is not available (maybe one does exist), which simply takes a blog id and returns pure text, however, I suspect it might be that blogger wants to discourage crawling.
http://blogname.blogspot.com/feeds/posts/default?alt=json
Replace blogname with you Blogname.
You will get JSON Object and use JSON FORMATTER to format the JSON.
I am wanting to write a small application that can pull RSS feeds from any RSS feed url. if anyone could give me very basic help on how to achieve this?
im only really starting out in the world on AJAX and this kinda stuff so any help would be appreciated.
Thanks
EDIT :- I am only trying to do this with Jquery and Ajax, I dont want to use PHP or any other server side code.
You want to first create an interface in HTML that allows one to read and subscribe to RSS feeds. You also need to find a way to store the RSS feeds subscribed.
Then you want to use AJAX to get the remote document. I assume you're doing this in jQuery as your tag indicate it does, so you can refer to this: http://api.jquery.com/jQuery.ajax/
Then, you need to parse the XML that's returned. Check out a RSS tutorial -> http://www.w3schools.com/rss/default.asp and use the jQuery library to parse the data (HTML is kinda like XML, so the jQuery methods still works for XML/RSS) -> http://think2loud.com/reading-xml-with-jquery/
Lastly. Display your data by constructing your interface with JavaScript.