We can embed visuals of a sheet very easily, with:
const vis = await qlikApp.visualization.get('<visual_id>');
vis.show('<visual_container>'); // Renders visual in the given HTML container
But, I could not find any such API for embedding Qlik sheet.
In the docs, I only found embedding sheet by copy pasting iframe
I don't think its possible to embed the whole sheet using the Visualization API. This API is targeting specifically visualizations (charts, tables etc.)
The only option I'm aware of is the iFrame (aka Single Interation API)
Seems that someone tried to "emulate" Qlik Sense sheet here. But it looks like this will display only the sheet objects (no selections bar for example).
Related
I was wondering if there is any API Call that can perform such operation (export sheet that contains only a chart as a PDF or image).
Firstly i was trying to export a chart from a sheet directly but i found out this is not possible via an API Call.
This is not possible to achieve with Sheets API. These are the interactions with charts that are available in the Sheets API.
With the Drive API, you can export a spreadsheet as a PDF in one line of code making use of the export() method (you can read more about it here). However, this will export the whole spreadsheet and not just the chart (most notably, the grid lines will be visible).
I would say that the best way to export just the chart is using Apps Script. It cannot be "directly" done here, as charts can only be fetched from a spreadsheet as images. Therefore, you then have to transform said image into a pdf. This can be accomplished in two ways: you can either create a blank pdf and append the image, or you can paste the image into a docs (or slides) file and save that docs file as a pdf.
Here I have opted for the second one:
function myFunction(){
var fileId = "YOUR_SPREADSHEET_ID";
var folderId = "YOUR_FOLDER_ID";
var chart = SpreadsheetApp.openById(fileId).getSheetByName("Sheet1").getCharts()[0];
var tempDocs = DocumentApp.create("temp");
tempDocs.getBody().appendImage(chart.getBlob());
tempDocs.saveAndClose();
docblob = DocumentApp.openById(tempDocs.getId()).getAs('application/pdf');
docblob.setName("myName");
DriveApp.getFolderById(folderId).createFile(docblob);
DriveApp.getFileById(tempDocs.getId()).setTrashed(true);
}
Having said that, you can also "brute force" export the entire spreadsheet as a pdf. You can achieve this by using the Drive API - Files - Export function. Note that this method belongs to the Drive API, not the Sheets API.
I am playing around with Microsoft PowerApps and Microsoft Flow. I am trying to figure out how to make API calls from PowerApps and return the results(Status and Body) to a field such as a text box in my app.
I can make the HTTP requests through Flow and put them in a static file such as an excel spreadsheet...etc. I can also make the calls from a PowerApps control such as a button but all I know how to do with it is return it to something like an excel file, when really I want to return it to a Text Box or Text Area.
Today you cannot access the raw HTTP status/body from a PowerApp. The way to call "arbitrary" HTTP endpoints is to use Custom APIs that you can describe using Swagger. I wrote a quick blog on how to call Azure functions that shows how to craft a swagger to call the API: https://powerapps.microsoft.com/en-us/blog/using-azure-functions-in-powerapps/
Might be good if you could clarify the specific scenario you are trying to build to see if there are other ways, but one option that comes to mind is to build a custom API that receives the URL and on the server-side performs the HTTP request and returns the values in an object that then you can easily access in PowerApps.
It is relatively straightforward to visualize API (JSON) responses using a PowerApps Gallery Control.
Do this:
Ensure the Flow has the correct JSON response before proceeding
Add ClearCollect(colResponse, myFlow.apiRequest()) Function to a Button Control in the PowerApp
Execute the API call (click the button)
Inspect colResponse (View/Collections) to ensure it has content
Insert a blank Gallery Control
Set its Items Property to colResponse
Insert a TextBox Control into the Gallery
Set its Text Property to ThisItem.<someColumn>
Depending on the shape of your JSON response (flat or nested table), you may have to do some wrangling.
There are 3 areas to focus your wrangling:
On the ClearCollect Function.
a. Add some dot notation to the end of this to "dig" into the API response before it hits the Gallery Control
b. Example: ClearCollect(colResponse, myFlow.apiRequest()).someColumn
On the Gallery Control Items Property
a. Add some dot notation to the end of colResponse to "dig" into the Collection
b. Example: colResponse.someColumn
On the TextBox Control within the Gallery
a. Add the First() Function to the Text Property
b. Example: `First(ThisItem.someColumn).someColumn2'
c. Note: There are some JSON schemas that require MULTIPLE First()'s to "dig" into the correct level. First(First(ThisItem.someColumn).someColumn2).someColumn3 etc.
See this video for tips on visualizing API responses in PowerApps Galleries.
given that the functionality for exporting graphs to SVG or PNG in the Neo4j server page is broken (see SO article), are there any utilities out there that can export a graph from Neo? something that would produce a PDF perhaps?
With not many changes, you could make it work with http://www.cloudformatter.com/CSS2Pdf to format the SVGs in browser to PDF. That set of pages has some d3 samples like this: http://www.cloudformatter.com/CSS2Pdf.SVGCharts.d3Charts
I took one of the sample charts and rendered to PDF through the Javascript and the remote formatter. The page I selected was here and I took one of those charts:
http://graphgist.neo4j.com/#!/gists/1428842b2170702400451777c2bc813f
The code needs some minor change to ensure that Neo4j puts the svg namespace on the element. The samples on that page do not. But the rendering is near perfect. See the web page on the right and PDF result on the left. I only formatted the SVG and not the whole page (where the silver background exists) and that seems to be the only difference.
I already created a list in which I added a content type. The list is for Research. There are different kinds of Research, so all of them will be placed in this list. Every Research type has its own chart. When the user is adding values in the form (list), the chart must be updated. I tried to add the web chart, but when I tried to connect it to the web part of the Research type, it says "Your page does not contain any Web Parts that are capable of providing data to your chart Web Part". How can I achieve my goal?
use highcharts . which is basically works with jQuery
I need to find a way to write a program (in any language) that will connect to a website and read dynamically generated data from the website.
Note that it's dynamically generated--it's not enough to get the source html, because the data I'm interested in is generated via javascript that references back-end code. So when i view the webpage source, I can't see the data. (For example, go to google, and do a search. Check the source code on the search results page. Very little of the data your browser is displaying is reflected in the source--most of it is dynamically generated. I need some way to access this data.)
Pick a language and environment that includes an HTML renderer (e.g. .NET and the WebBrowser control). Use the HTML renderer to get the URL and produce an HTML DOM in memory (making sure that scripting is enabled). Read the contents of the HTML DOM after the renderer has done its work.
Example (you'll need to do this inside a System.Windows.Form derived class):
WebBrowser browser = new WebBrowser();
browser.Navigate("http://www.google.com");
HtmlDocument document = browser.Document;
// extract what you want from the document
I used to have a Perl program to access Mapguide.com to get the drive direction from one location to another location. I parsed the returned page and save to database. If the source never change their format, it is OK. the problem is the source format often change, your parser also need change.
A simple thought: if we're talking about AJAX, you can rather look up the urls for the dynamic data. Then you can use the javascript on the page you're talking about to reformat this.
If you have Firefox/greasemonkey making a DOM dumper should be a simple matter.