SpagoBI Chart rendering engine in custom webapp - spagobi

I'm struggling to have a chart correctly rendered in an html page.
In SpagoBI webapp, I log in as "biuser", then go to "document" menu, then take the 1st chart that is already here ("Char Grouped Bar"). In the Spago webapp, I can see the chart, as it is rendered through ExtJS.
Then I want to display this chart in an html page, to put in my own webapp. I acheive this with the Spago Javascript SDK, via the injectDocument method.
My code is:
Sbi.sdk.api.injectDocument({
documentLabel: 'Char Grouped Bar'
, executionRole: '/spagobi/user'
, parameters: {warehouse_id: 19}
, displayToolbar: false
, displaySliders: false
, target: 'targetDiv'
, height: '500px'
, width: '800px'
, iframe: {
style: 'border: 0px;'
}
});
This does not work, as the SDK wants to render the chart via the HighCharts library, and I do not have this library (and do not want to).
=> I can see no documentation about this, so, how can I render the chart via ExtJS, as in the SpagoBI admin webapp?
Thanks!

Related

Spinner alert Ionic

I want show an alert with a spinner in subTitle like:
I tryed, without success:
this.alertCtrl.create({
title: 'Verificando',
subTitle: '<ion-spinner name="dots"></ion-spinner> foo bar'
});
Any ideas ?
Unfortunately AlertController from Ionic 2 doesn't offer a way by default to embed HTML code inside the title/subtitle attribute. Will this alert be used only when you are loading something?
On that case I suggest that you use the LoadingController component, with LoadingController it's possible to insert html embedded code as the content attribute.
For instance, on this case I have created a custom CSS animation on class .sp .sp-slices that I'm inserting on the LoadingController variable named loadingCtrl:
this.loading = this.loadingCtrl.create({
spinner: 'hide',
content: '<div class="sp sp-slices"></div>'
});
this.loading.present();
Using this should give you flexibility enough to adjust the LoadingController component to look exactly like what you need.
Ionic 2 also offers other LoadingController designs that are much closer to the native default look for Android iOS and Windows Phone. It's worthy taking a look at their API documentation:
https://ionicframework.com/docs/api/components/loading/LoadingController/

Kendo UI Grid Excel export issues

I'm trying to use the (relatively new) built-in Excel and PDF export features in Kendo UI grid, which seem pretty straightforward. The PDF downloads with all of the data, but the Excel file just has the column headers with no data.
Just trying for the most basic implementation of this at the moment; in the grid init block I have:
$("#accountsContactsGrid").kendoGrid({
toolbar: ["excel", "pdf"],
excel: {
fileName: "DonorsGridExport.xlsx",
filterable: true
},
pdf: {
fileName: "DonorsGridExport.pdf"
},
dataSource: { <snip rest of datasource code...> }
});
The grid shows fine in the browser as well as the PDF. It's just the Excel that is the exception, with no data showing.
I also tried pulling the buttons outside of the toolbar and using the saveAsExcel and saveAsPDF functions, and I get the same result (PDF works, Excel has no data).
Any ideas why the data would go missing just for the Excel export?

Render Anchor by using Glassmapper in sitecore mvc

I am facing problem for rendering the anchor by using the glass mapper in sitecore mvc.
This is the code I have used to render the link:
#RenderLink(promoWidget, x => promoWidget.Link, new System.Collections.Specialized.NameValueCollection { { "target", promoWidget.Link.Target },{"class",promoWidget.Link.Class}}, true, contents: promoWidget.Link.Text)
But when from sitecore we select the link and click on insert anchor I put the text and anchor text. When I display this link by using above code it will render link this:
product
It is showing 2 times product#product. I want to display only once #product.
How can I do this?
Appreciate the help
Thanks,
Amol

Kendo UI Scheduler: customizing rooms header

I'm using the Kendo UI Scheduler (open source) with the horizontal grouping, developing in ASP.NET MVC. I display different rooms in order that users can make bookings to one of these. But instead of the room name I also want to display some icons according to the equipment available in this room (ex: a beamer).
Here you can see an example of what I have now and what I want to have:
So my question: is it possible to include these icons in the header of my scheduler and how? + after clicking these the user should be redirected to the detail page of this room.
Thanks in advance!
I believe (from your image) that you need to make a Custom View and replace the "Day" view with the Custom View. That should allow you some flexibility.
Since you are using the HTML5/JavaScript version of Kendo UI, here's an example project of developing a custom view: http://www.telerik.com/support/code-library/custom-view For those seeing this post that need the ASP.NET MVC version of the Custom View example, that is located here: http://www.telerik.com/support/code-library/custom-view-0286055de51d
We can achieve this by custom headers.
Use dateHeaderTemplate property of Kendo Scheduler.
Read about this here: link
Basics of dateHeaderTemplate
<div id="scheduler"></div>
<script>
$("#scheduler").kendoScheduler({
date: new Date("2013/6/6"),
dateHeaderTemplate: kendo.template("<strong>#=kendo.toString(date, 'd')#</strong>"),
dataSource: [
{
id: 1,
start: new Date("2013/6/6 08:00 AM"),
end: new Date("2013/6/6 09:00 AM"),
title: "Interview"
}]});
</script>
Please refer below 2 posts to customize the header.
post 1
post 2
Rendering can be done in dataBound event
dataBound: SchedulerView.Scheduler_DataBound,
Method
Scheduler_DataBound: function () {
//write logic here to
}

Ajax Div Loader: UberGallery not working through Ajax

I am using UberGallery for my site:
http://www.ubergallery.net/
Here is a sample of the page with Uber Gallery called directly in the HTML
http://www.goloyal.com/clients/dealers-mlm.php
If you click on a thumbnail it opens the popup div.
Some pages have a lot of thumbs, so they load slowly, so I tried to call the Uber Gallery through an Ajax so the page would load, then the thumbs could take their time:
/old-dealers-mlm.php
The loader works exactly as I hoped, however when you click on the thumbnails it opens in a new page (not the pop up div)
I am calling THIS div in my ajax
/div-dealers-mlm.php
Which also has the popups showing correctly.
I do understand that the pages are loaded separately, and I know it requires a special conversation to tell one page to do something in the other. However, I am not sure what I need to relay to the parent/original page, or how to do it to start testing. Any ideas?
THANKS!
The problem is that you're setting up the colorbox on links that don't exist yet. You need to replace your current colorbox code with this:
$(document).ready(function(){
$(document).on("click", "a[rel='colorbox']", function(e){
e.preventDefault();
var url = this.href;
$.colorbox({href: url, maxWidth: "99%", maxHeight: "99%", opacity: ".5"});
});
});
This uses jQuery .on() to bind the click event to all current and future a elements with a rel attribute that equals colorbox.

Resources