I have published a Tableau 9.3 viz on Tableau public:
https://public.tableau.com/profile/michel.page#!/vizhome/exercice1/Courbesventesetprofit
I have succedded to have this viz displayed in a web page by integrating the code given by the 'Share' button on the Tableau public viz page.
Now I want to do the same, but inside an IPython notebook. It seems to be possible because I saw an example in nbviewer here: http://nbviewer.jupyter.org/gist/msund/96bd1d837f4139b2558d
I have integrated the 'Share' button script code into a Markdown cell but the viz won't get displayed when the cell is run. When I look at the browser console, it seems that the js code, and object tag get sanitized, even if I tell IPython to trust the notebook.
Is there any workaround ?
If you want the Tableau viz to show up in your Jupyter notebook, Use the %%HTML magic in a normal cell:
%%HTML
<div class='tableauPlaceholder' id='viz1474058356757' style='position: relative'><noscript><a href='#'><img alt=' ' src='https://public.tableau.com/static/images/ex/exercice1/Courbesventesetprofit/1_rss.png' style='border: none' /></a></noscript><object class='tableauViz' style='display:none;'><param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' /> <param name='site_root' value='' /><param name='name' value='exercice1/Courbesventesetprofit' /><param name='tabs' value='yes' /><param name='toolbar' value='yes' /><param name='static_image' value='https://public.tableau.com/static/images/ex/exercice1/Courbesventesetprofit/1.png' /> <param name='animate_transition' value='yes' /><param name='display_static_image' value='yes' /><param name='display_spinner' value='yes' /><param name='display_overlay' value='yes' /><param name='display_count' value='yes' /></object></div> <script type='text/javascript'> var divElement = document.getElementById('viz1474058356757'); var vizElement = divElement.getElementsByTagName('object')[0]; vizElement.style.width='100%';vizElement.style.height=(divElement.offsetWidth*0.75)+'px'; var scriptElement = document.createElement('script'); scriptElement.src = 'https://public.tableau.com/javascripts/api/viz_v1.js'; vizElement.parentNode.insertBefore(scriptElement, vizElement); </script>
This is a great resource on what else you can do with magics: https://blog.dominodatalab.com/lesser-known-ways-of-using-notebooks/
Basically what you need to do is this
step 1) copy the java script tag from Tableau workbook
step 2) Go and add the code in your jupyter cell code as below
Compared with R and Python, Tableau is a much faster way for data visualization. The best practice I can come up with is to set size to automatic when you create in tableau, share it on Tableau Public, and put the embed code like the following after you publish.
%%HTML
<Embed Code Here>
Look for example here:
https://www.kaggle.com/andyxie/tableau-sharing-best-practice/
Related
I have a line chart in my sapui5 app and I want to put it in an object page subsection. When I put it in a normal layout in a page, it's working. But when I separate it in a fragment and call from object page subsection nothing is shown.
here is my fragment :
<core:FragmentDefinition xmlns:m="sap.m" xmlns:core="sap.ui.core" xmlns:viz="sap.viz.ui5.controls" xmlns:layout="sap.ui.layout"
xmlns:mvc="sap.ui.core.mvc" xmlns:viz.feeds="sap.viz.ui5.controls.common.feeds" xmlns:viz.data="sap.viz.ui5.data" height="100%" xmlns:common="sap.suite.ui.commons">
<layout:FixFlex>
<layout:flexContent>
<viz:Popover id="idPopOver"></viz:Popover>
<viz:VizFrame id="idLineGraph" uiConfig="{applicationSet:'fiori'}" height='100%' width="100%" vizType='line'></viz:VizFrame>
</layout:flexContent>
</layout:FixFlex>
</core:FragmentDefinition>
and here is my subsection:
<ux:ObjectPageSection id="idChart" title="{i18n>chartSection}" titleUppercase="false">
<ux:subSections>
<ux:ObjectPageSubSection>
<ux:blocks>
<core:Fragment id="idChartFragment" fragmentName="mynamespace.zmm_stok_list.fragments.grafik" type="XML"/>
</ux:blocks>
</ux:ObjectPageSubSection>
</ux:subSections>
</ux:ObjectPageSection>
I also saw that question Q but it looks like OP have preferred to keep that answer which hi's found for himself.
lastly, there a blog about almost same thing but using cds views.blog
But you know cds views are not like xml views and I guess they are generated automatically and we can not see which componenets are used.
So I still couldn't found a way to do this that way. But if I put my vizframe in object layout section directly (not seperated in a fragment) and give the height of vizframe with pixels it works. Not much but I'm ok with this.
Ps: When vizframe is seperated in a fragment, giving its height with pixels does not work either.
I am updating a project to TYPO3 8LTS and I am using the latest version of flux and fluidcontent. It works most of the time. However I have an issue that I could not solve without digging too deep into flux and core. So maybe sombody here can spot the issue on my part and save me some debugging.
I have a fluidcontent element with expandable objects. It is an accordion where the editor can add as many panels as needed. The configuration looks like this:
<f:section name="Configuration">
<flux:form id="accordion">
<flux:form.option name="group" value="Container" />
<flux:form.option name="icon" value="EXT:my_ext/Resources/Public/Images/ContentIcons/Accordion.jpg" />
<flux:form.section name="panels">
<flux:form.object name="panel">
<flux:field.input name="title" />
<flux:field.checkbox name="active" />
</flux:form.object>
</flux:form.section>
</flux:form>
<flux:grid>
<f:for each="{panels}" as="panel" iteration="iteration">
<flux:grid.row>
<flux:grid.column name="column.{iteration.index}"
label="{f:if(condition: panel.panel.title, then: panel.panel.title, else: 'Panel {iteration.cycle}')}" />
</flux:grid.row>
</f:for>
</flux:grid>
</f:section>
This works like intended. It is possible to add and remove panels. However if I create a new content element and add some panels and then save&close the content element for the first time I get a core error message, telling me
"_1: Attempt to insert record on page '[root-level]' (0) where this
table, tt_content, is not allowed_".
The created content element was stored correctly in the database with all fields but the pi_flexform field where the configuration of the panels is stored. That field is empty. I can now edit the element and create panels and the configuration is saved successfuly.
The error only occurs the first time a new content element is saved.
The issue was identified as core regression in the meantime. A fix will (hopefully) be included in one of the next LTS releases.
https://forge.typo3.org/issues/80825
We have a XML file that is on somewebsite and looks in a way like this (confidential parts stripped)
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<feed xml:base="https://somewebsite.com/crm/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom">
<title type="text">Accounts</title>
<id></id>
<updated>2016-02-04T08:36:56Z</updated>
<link rel="self" title="Accounts" href="Accounts" />
<entry>
<title type="text"></title>
<updated>2016-02-04T08:36:56Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:Type>A</d:Type>
<d:UniqueTaxpayerReference m:null="true" />
<d:VATLiability m:null="true" />
<d:VATNumber m:null="true" />
<d:Website m:null="true" />
</m:properties>
</content>
</entry>
<link rel="next" href="https://somewebsite.com/Accounts?$skiptoken=guid'ee6bc390-a8ac-4bbd-8a4d-0a1f04ab9bd3'" />
</feed>
We use the new Rest connector to get the data out of this XML file.
The XML has pagination and every 60 entries you can load the next 60 with the link at the bottom of this xml file.
The problem i have is when, in the REST connector, we want to enable pagination with these setting:
Pagination Type: Next URL
Next URL field path:
/*[name()="feed"]/*[name()="link"][contains(#rel,"next")]/#href
It doesn't seem to work...
side note: the XML file has namespaces so i need to target the elements this way instead of /feed/link/...
I'm using Xpath syntax to target the link href, but maybe this is not the way to go? Or maybe the REST connector isn't using Xpath syntax?
Really hope someone can help me!
Actually it turns out that this seems to be due to a "bug" in the "Qlik REST Connector 1.0" so the pagination doesn't work.
But there is a fix for it:
1) Make sure that the Qlik REST Connector 1.0 connect dialog box has the NextUrl set to:
feed/link/attr:href
2) When the SQL has been generated after using the SELECT-button and going through the wizard you have to modify the sub-SELECT that reads like this:
.....
(SELECT
"attr:rel" AS "rel",
"attr:title" AS "title",
"attr:href" AS href,
"__FK_link"
FROM "link" FK "__FK_link"),
.....
On line 05 you will have to remove the text AS href.
So it should look like this:
.....
(SELECT
"attr:rel" AS "rel",
"attr:title" AS "title",
"attr:href",
"__FK_link"
FROM "link" FK "__FK_link"),
....
3) Find the LOAD statement that loads from this sub-select with a RESIDENT [MasterREST further down in the load script and make sure that the reference to href is changed to [attr:href] - or else you will get an error message while loading.
Should look like this after the change:
[link]:
LOAD [rel],
[title],
[attr:href],
[__FK_link] AS [__KEY_feed]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_link]);
This worked for me:
/*[name()='feed']/*[name()='link'][#rel='next']/#href
Yours should also work actually, maybe whatever you are using does not agree with double quotes instead of single quotes.
<flux:field.input name="pages">
<flux:wizard.link label="Select link" activeTab="pages" />
</flux:field.input>
with this I can select ONE page. But how can I select MULTIPLE pages, like it is done at the Menu-Content-Items.
tryed: field.select -needs an item-propery.
field.relation I did not succeed, too.
Thank you for your help,
Christian.
Edit: This is what I'm currently trying:
<flux:field.relation
name="settings.relationtest"
label="relationtest"
multiple="true"
size="6"
minItems="0"
maxItems="30"
renderMode="singlebox"
foreignTableField="pages"
>
<flux:wizard.suggest
label="NULL"
hideParent="0"
pidDepth=""
minimumCharacters="1"
searchWholePhrase="0"
table="pages"/>
</flux:field.relation>
Had the same problem and tried a lot with different viewhelpers. flux:field.relation seems the right solution for this one. I use a quite simple snippet:
<flux:field.relation label="Auswahl der Seiten" table="pages" size="6" multiple="true" minItems="0" maxItems="30" name="parentpages">
<flux:wizard.suggest />
</flux:field.relation>
Selecting multiple pages works fine.
Perhaps your problem came from setting the 'table' parameter on flux.wizard.suggest (Link).
I am trying to get an open search definition to work on subdomains.
I have added the correct line in the <head> of the html.
Example:
<link rel="search" type="application/opensearchdescription+xml" title="Example" href="http://www.example.org/opensearch.xml" />
In opensearch.xml:
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>Example</ShortName>
<LongName>Example Search</LongName>
<Description>Example Description</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16" type="image/x-icon">http://www.example.org/favicon.ico</Image>
<Url type="text/html" method="get" template="http://www.example.org/search/{searchTerms}" />
</OpenSearchDescription>
The search is correctly added to the omnibox settings in Google Chrome, when I visit http://www.example.org. The trigger keyword becomes "example.org".
However, when I visit http://subdomain.example.org, which has the same line in the <head>, the search is added with trigger keyword "subdomain.example.org" instead of "example.org".
Is there a way around this?
I have not found any information on how to set the trigger keyword in the documentation at http://www.opensearch.org/Specifications/OpenSearch/1.1 .