Quantcast
Channel: SAP BusinessObjects Design Studio
Viewing all 662 articles
Browse latest View live

Switch BEx Conditions on demand from SAP BusinessObjects Design Studio

$
0
0

We often get requests for dashboard requirements like switching the conditions of particular views such as TOP N , Bottom N , Less than X , Top % etc. Readers may recall that this was also recently asked in one of the SCN posts.In this blog, I am going to explain simple steps that will have great impact in performance of the application by reducing the number of Queries used.


Conditions in BEx

We generally define condition to show only a part of the entire dataset that satisfies the specified condition. There are different types of conditions in SAP BusinessObjects Design Studio.

You can learn more about Conditions in BEX here- Definition of condition , usesand example scenarios

.

Our Scenario  – Sales Dashboard

Let us consider a Sales dashboard that consists of list of customers and the revenue generated by them.  Sales Executives are typically interested in looking into their customers as different segments.  For instance, they would want to view them  as Top N customers, Bottom N customers, Top N% Customers, Bottom N% Customers, Customers for whom the revenue is Greater Than X,  and Customers for whom the revenue is Lesser Than X.

How this is generally done?

  • Create 6 Queries (one for each condition)
  • Add an input variable to the condition in all Query
  • Add all the queries to SAP BusinessObjects Design Studio and map it to the desired component like chart/crosstab
  • Provide an option to specify the condition like radio button or dropdown
  • Provide an option to get the input with a suitable component like input field or dropdown.

How this can be done effectively?

Although the above method solves the purpose, it is highly inefficient since it utilizes multiple queries. With the release of SAP BusinessObjects Design Studio 1.4, there is a way to deliver this requirement more easily and effective using only one query.

Here’s how:

Step 1

Create a Query in SAP Business Explorer (BEx) with the required dimensions in rows and columns.

query-in-sap-business-explorer.png

Step 2

Create a condition for the keyfigure with an input variable –

Click on Condition Tab -> Right Click ->New Condition

 

conditions-in-sap-business-explorer.png

Add a Description as Top N, then click on New button to define the condition in which you will be prompted to add the keyfigure, operator and the value for the condition.

change-conditions-in-sap-business-explorer.png

After selecting the necessary keyfigure and operator, click on the icon adjacent to the ‘values’ input box to add input variable as a value. Now you can use an existing input variable or create a new one.

Step 3

Create an input Variable and provide a suitable Description and Technical Name for the variable. In the Global Setting section, select the option Manual Input / Default Value under Processing By option.

To set a value as default click on Default Values Tab and select a value for the variable.

change-variable-in-sap-business-explorer.png

Similarly follow Step 2 and 3 to create all other conditions.

Once all six conditions are created, activate the condition only for TOP N and deactivate all other conditions.

activate-conditions-in-sap-business-explorer.png

 

Step 4

Add this Query as a Data source and assign it to a chart in your SAP BusinessObjects Design Studio application.

chart-in-sap-businessobjects-design-studio.png

Add a radio button as selector for switching the conditions.

radio-button-in-sap-businessobjects-design-studio.png

radio-buttons-in-sap-businessobjects-design-studio.png

Add an input field to specify the value to be passed to the input variable and an Apply Button to pass the value to the query and fetch the data that matches the selected condition.

input-field-in-sap-businessobjects-design-studio.png

Step 5

Give the following script in Apply Button:

/*Get all the ids of contions used in the Query */
var contion_ids=DS_1.getMeasureFilters();

/*Use a for Each Loop to dynammically activate and Deactivate the selected conditions */
contion_ids.forEach(function(element, index) {

/*if the index (order of the condtion) is equal to the getselectedvalue of the radiobutton Then activate the condtion */
if(RADIOBUTTONGROUP_1.getSelectedValue()==index+””)
{
DS_1.setMeasureFilterActive(element, true);
}
/*Deactiate all other condtions */
else
{
DS_1.setMeasureFilterActive(element, false);
}
});

/*Pass the value specified in the inputfield to the variable */
DS_1.setVariableValueExt(“ZVAR_INPUT_N”, INPUTFIELD_1.getValue());

 

top-n-and-bottom-n-in-sap-businessobjects-design-studio.png

Explanation

If the condition selected is Bottom N, then RadioButton.getselectedValue() will be 1.

For the first iteration, the condtion_id array will have index=0; the loop ignores the ‘if’ section and executes the ‘else’ section, thereby making Top N condition inactive.

For the second iteration, the condtion_id array will have index=1; so ‘if’ part gets executed, the Bottom N condition is made active.

From the next iterations, ‘else’ part is executed; all other the conditions are made inactive.

top-n-and-bottom-n-in-charts-in-sap-businessobjects-design-studio.png

I hope this blog has helped you in understanding the powerful APIs of Datasource alias getMeasurefilterids() and  setMeasurefilter (id,activate/deactivate).

Through these easy steps, you will be able to use multiple conditions in single Query and activate them on demand from SAP BusinessObjects Design Studio. This method will have great impact on the performance of the application.


Design Studio 1.5 SP0 Patch 1 available

$
0
0

Design Studio SDK: Process Flow - Unified UI5 Component

$
0
0

continuing the series of Design Studio SDK: New Unified UI5 Components, today the component Process Flow. Actually, I have chosen it to improve the generation logic, but as the output working, you can use it as well..

 

Today it is working only for non-data-bound definition.

 

It looks like:

pf.PNG

 

You can do:

* add Lanes

* add Nodes

 

Restrictions

* only for manual definition

* you can use scripting for adding nodes on the fly (also deletion is working), BUT it seems change of "Lanes" is not working (for me looks like UI5 issue)

 

The APS

pf1.PNG

 

In this occasion, the APS code for arrays is now better - there are also combo boxes for properties which have defined list of values.

 

Events

You can use the events to react on selection, eg Node Pressed:

APPLICATION.createErrorMessage("Pressed: " + PROCESSFLOW_1.getNodePressedKey());

 

Sometimes adding of new Nodes / Lanes causes "diapearing", assure you have set all properties correctly, especially the Node Id (unique) and Lane Id, also a Node MUST be assigned to Lane! Sometimes you need to refresh the canvas.

 

Another Example

pf3.PNG

Download & Use

This component is available on the community package, release 2.0 for Design Studio 1.5, as in SCN Design Studio SDK Development Community

 

Example as BIAPP:

org-scn-design-studio-community/applications · GitHub

 

SDK_PROCESSFLOW_20

 

Documentation

Component List - SCN Design Studio Community -> look for the component in the list.

 

Any thoughts?

feel free to add as usual...

 

Enhancements Ideas?

if you have good ideas (to those who would like to contribute but cannot code...) - place an "issue" with tag "enhancement" under Issues · org-scn-design-studio-community/sdkpackage · GitHub

Design Studio SDK: Activity Viewer (manual Gantt Chart)

$
0
0

this component is already longer in the repository, but I could not find time to describe. For me it was an opportunity to learn a bit work with d3 code... this component is based on the d3 plugin dk8996/Gantt-Chart · GitHub.

 

How does it look?

av1.PNG

 

How you can use it?

There are 3 arrays for definition. Activities, Categories and States.

 

States

states allow you to assign a style class to the block. some pre-defined styles are defined in the initial definition. but you can add new one - assure you have the corresponding class in your css.

 

Categories

with categories you can define the Y-axis

 

Activities

activities must be assigned to category and state, then you can get nice display.

 

Events & Interactions

There is selection event, the id of selected block will be given back.

APPLICATION.createErrorMessage("Selection: " + ACTIVITYVIEWER_1.getSelectedKey());

 

You can use a plenty of script functions to change the content.

 

Perhaps someone can make use of it.

 

Download & Use

This component is available on the community package, release 2.0 for Design Studio 1.5, as in SCN Design Studio SDK Development Community

 

Example as BIAPP:

org-scn-design-studio-community/applications · GitHub

 

SDK_ACTIVITY_VIEWER

 

Documentation

Component List - SCN Design Studio Community -> look for the component in the list.

 

Any thoughts?

feel free to add as usual...

 

Enhancements Ideas?

if you have good ideas (to those who would like to contribute but cannot code...) - place an "issue" with tag "enhancement" under Issues · org-scn-design-studio-community/sdkpackage · GitHub

Design Studio SDK: Radio Button Group - Unified UI5 Component

$
0
0

again, continuing the series of Design Studio SDK: New Unified UI5 Components, today the component Radio Button Group.

The generation code is better and better, the time required for components is getting less.

 

Today it is working only for non-data-bound definition.


How does it look like?

actually, it is a normal radio button group, directly as in UI5 library. you can dynamically add, change delete content.

rb1.PNG

The value is that you can define it also with more columns... so it is also a horizontal radio button group.


Events & Interactions

There is selection event, the id of selected block will be given back.

APPLICATION.createErrorMessage("Selection: " + ACTIVITYVIEWER_1.getSelectedKey());

 

You can use a plenty of script functions to change the content.

 

eg. add a button:

RADIOBUTTONGROUP_1.addButton("BUT2", false,

  200, false, true, "G", true, "The Next", "End", "LTR", "Warning"

);

rb2.PNG

Perhaps someone can make use of it.

 

Btw. I forgot to place some buttons in default, I make this later on - today it is empty when you drop into canvas.

 

Download & Use

This component is available on the community package, release 2.0 for Design Studio 1.5, as in SCN Design Studio SDK Development Community

 

Example as BIAPP:

org-scn-design-studio-community/applications · GitHub

 

SDK_RADIO_BUTTON_GROUP

 

Documentation

Component List - SCN Design Studio Community -> look for the component in the list.

 

Any thoughts?

feel free to add as usual...

 

Enhancements Ideas?

if you have good ideas (to those who would like to contribute but cannot code...) - place an "issue" with tag "enhancement" under Issues · org-scn-design-studio-community/sdkpackage · GitHub

FIVE1 Extension - CS5

$
0
0

Hi guys!

 

Let me introduce you our extension for SAP Design Studio - FIVE1 CS5

With FIVE1 CS5 knowledge can be stored directly to the context. Either in a dedicated area, or directly in the data table.

 

Features:

- Extending/manipulating the SAP Crosstable

- Commenting in:

     1. Crosstable

     2. CS5 Editor

     3. Charts

     4. Basically everything where you can click on

- Endless comments, easy formatting

- Key manipulation: deactivate, set specific keys or apply an offset for date characteristics

- Add multiple commentary columns to the crosstable and pick their positions

- Scripting commands like: show/hide columns, set readonly, disable, save, auto-save, set keys...

- Stand-alone Editor

- Visual customizing, cell colors, width/heights, css styles

- (Communication with Excel -> FIVE1 CSX)

 

CS5 Editor - no crosstab is attached yet. Two tasks you have to do:

1. assign a DataSource

2. enter backend connection url

 

Design Time:

editor_standalone.JPG

 

In the runtime you can handle the characteristics, you want to comment to, with the generated Dropdown-Boxes

or use your own key-holder components (just by adding 1 line of scripting)

 

Runtime:

editor_sa_saved.png

 

 

Now the interesting part: attached to a crosstab

crosstab_keys.JPG

We see that this little dragon (who disappears in runtime), has already modified the crosstab.

2 Columns where added, the second one has key changes and a custom title:

 

- "Kalenderjahr" was set with an offset to +2

 

 

Runtime:

crosstab_comment.JPG

Cells automatically get bigger, if the width/height settings stay on "auto"

General design settings screenshot:

adp_design_1.JPG

 

 

 

What do you think?

 

For more information: FIVE1 CS5 | software.five1.de

PDF exporting gone wild

$
0
0

Did you ever have the need to export your crosstab data in a shiny enterprise ready reporting manner? At this point in time those are your options in a short overview regarding pdf functionality:

 

  • SAP BusinessObjects Crystal Reports
    • Well proven in the SAP community [+]
    • BO server dependent (BI platform) [-]
    • But extra cost [-]
  • Third party SDK extensions
    • Client-side only exporting (easy, no security issues) [+]
    • Available from DS12 and upwards [+]
    • Proprietary extra server component needed [-]
    • Special crosstab setup to make it work (+several scripting customizations), e.g. crosstab data loading mechanism to have all query data in the browser for the SDK component to grab [-]
    • Very flexible but heavy CSS knowledge needed to make it “shiny” [-]
    • Extra cost [-]
  • DS15 standard component
    • Integrated and no extra cost [+]
    • Not flexible enough yet (gui only and almost no scripting capabilities), SAP promised according to the road map to improve it to a certain extent by 1.6 in November [-]
    • Current version far from being “shiny” at all [-]
    • Only Available from DS15 upwards
  • Community SDK PDF component
    • Integrated and no extra cost [+]
    • Available from DS13 upwards [+]
    • More flexible scripting options than standard component though [+]
    • Can be reused to your specific needs if coding effort is ok and the javascript library jsPDF is understood [+]
    • Suffers from similar problems like the standard component [-]

 

However, none of those options offer you the capability to play with the result set and the data breakdown outside the BEx query result view options in a reasonable way or even not at all. I recently faced the challenge to mix attributes/characteristics and key figures on the same breakdown on the pdf export. In order to get this done with the options described above, you would need the query to do it or put some heavy customization into one of the SDK components. Unfortunately this kind of functionality is no longer supported since the BEx query version upgrade from 3.x (see http://scn.sap.com/docs/DOC-54701).

 

Luckily I have an easy, tightly integrated and already successfully implemented approach for you guys. Let me briefly describe how it works before we go more into the technical details. The actual data crunching happens on the ABAP backend using either:

 

 

The result is than passed to the SAP Adobe pdf module. This module does the magic to fulfill the described task to mix all sorts of dimensions because the BEx query restrictions no longer apply. That way we were able to bring the characteristics into the key figure dimension again. There is some coding effort though to design, style the pdf and bring the data into it. But as you can imagine, controlling all of this and customizing it to your every need is highly beneficial. At this point the only additional thing you need, is a SDK component that identifies the query you want to export and passes that information to your ABAP backend.

 

Now you legitimately wonder how does this ABAP coding integrate with DesignStudio. I developed a SDK component that exposes web service calling functionality and events using the HTTP verbs GET and POST to DesignStudio scripting. The actual call is performed asynchronously by jQuery with AJAX which is standard best practice on the web. Just define the mime type of your HTTP response to be application/pdf and either save it using frameworks like FileSaver.js or open a new tab and use your preferred browser’s pdf plugin to display it right away. Let me say that there is one pitfall to this. Your DesignStudio app runs on the SAP java stack and all of your data resides on the SAP ABAP stack, which means you are going to encounter cross-origin security issues due to the same origin policy trying to perform an AJAX call from another domain. This topic is already discussed in depth so I will only mention a couple of example sources for further reading.

 

 

I would recommend choosing the CORS setup over JSONP in a production environment for security reasons and compliance with the standard web protocols but I like JSONP for development and debugging purposes because of its ease of use.

 

As a good starting point you can check out my DesignStudio community SDK team mate Karol Kalisz’s component PostResponseParser:

https://github.com/org-scn-design-studio-community/sdkpackage/tree/master/src/org.scn.community.utils/res/PostResponseParser

 

I also plan on publishing a new component under the community SDK’s utils section for standard web service communication so that you can build upon the component even easier in the near future.

 

So there is only one missing piece in the setup. How does the ABAP stack receives the call from the DesignStudio SDK component? There are several options but I like to mention two that appeared easiest and most straight forward to me. Cesar Martin’s approach offers much more HTTP functionality and methods out of the box but the SAP standard WebRFC function module is setup much quicker.

 

SAP standard WebRFC

 

You can find a very good article on how to set that up in five minutes here http://scn.sap.com/community/netweaver-as/blog/2012/08/07/webrfc--simply-calling-an-rfc-from-javascript. After you activated your web-ready function module on SICF you are ready to fire your first test call from DesignStudio.


Cesar Martin’s HTTP class

 

Cesar published his implementation of the SAP standard web interfaces here https://github.com/cesar-sap/abap_fm_json. His article on that matter is also worth reading http://scn.sap.com/community/abap/connectivity/blog/2013/03/05/json-adapter-for-abap-function-modules. You are once again ready to fire a test call from DesignStudio.

 


Architecture Overview:

PDF exporting architecture.png

Figure: PDF exporting SDK extension UML structure and deployment diagram


Technical query name and BEx variable values are passed using the HTTP payload or the standard query string. Of course you will need to define a REST interface upfront for both components to be able to exchange data with each other.

 

One last thing I like to mention is that DesignStudio offers a scripting function to identify the query on both the frontend and the backend.

 

DS_1.getInfo().queryTechnicalName

 

That way you can find out the BEx query’s technical name to use with the function module 'RRW3_GET_QUERY_VIEW_DATA' or the corresponding Easy Query. There are a lot of more useful attributes hidden within the getInfo() method, for example to learn more about the last modified date of a datasource or the underlying info provider.

 

To put it into a nutshell: Once setup, exporting arbitrary queries in the most flexible and “shiniest” manner with DesignStudio no matter the release version (DS12+, because at least SDK is needed), really is a walk in the park.

 

Thanks for reading. Follow up questions as well as your comments are most welcome as usual.

 

Yours

Martin

ASUG BI Webinar List - August 2015

$
0
0

Here the updated list of webinars for August 2015

 

For all webinars :

 

Start Time : 11:00 AM (CT), 12:00 PM (ET), 10:00 AM (MT), 9:00 AM (PT)


Duration : 1 hour


 

 

  • August 04 - Capitalize on Advanced Analytics with SAP HANA

    SAP HANA is a modern platform that helps achieve agility and simplicity by converging data processing, application, integration, streaming services, and a suite of advanced analytic capabilities. Learn about SAP HANA’s advanced analytic services and common use cases including text analysis & mining as well predictive, spatial, and graph.

 


 


  • August 12 - Advanced Personalization of Hybris with SAP Predictive Analytics

    This session will walkthrough integration of Hybris with SAP Predictive Analytics for advanced personalization, which enables organizations to target their customers to increase conversion rates. You can define targeting rules to present products, offers, categories, etc. to customers to stimulate additional spending.

 

  • August 13 - SAP IT Operations Analytics

    An introduction to SAP’s latest analytics solution, SAP IT Operations Analytics. Learn how you can stream data from various data center tools for a comprehensive, realtime, view of your network. And go beyond monitoring and alerting to actually predict outages before they occur.



  • August 20 - SAP Business Warehouse Data Provisioning from SAP and Non-SAP Sources

    The operational data provisioning (ODP) framework has been greatly enlarged during the last releases of SAP Business Warehouse (BW) and offers new, optimized provisioning capabilities. Together with the SAP Landscape Transformation replication server implementation into ODP, fascinating real-time insights are now supported wherever needed.


 

 


I hope you enjoy these session.

 

Please note, that these are webinars organized by the ASUG BI group and for attending you need to be a ASUG Member.


Reverse Lasso in SAP BusinessObjects Design Studio

$
0
0

Lasso Selection capability is a powerful feature that comes with SAP BusinessObjects Design Studio.  Using the Lasso selection functionality allows you to select a particular chart area and zoom into it. For more information on creating a lasso selection, click here.


In this blog we will discuss the merits of reverse lasso functionality.  Reverse lasso is unique because allows you to remove a particular selection from the chart. This is useful when the user wishes to see only particular KPIs on the chart during runtime.


Since we are selecting multiple members on the chart, it is mandatory to set the “Selection Mode” for the chart under the “Additional Properties” panel to “Inclusive”. This setting will let you select multiple series on the Chart.


reverse-lasso-in-sap-businessobjects-design-studio-inclusive-selection-mode.jpg


The reverse lasso feature is also very effective and flexible because it can be incorporated into any chart. Reverse lasso functionality can be achieved by excluding the selection and then passing it as a filter to the data source.



reverse-lasso-in-sap-businessobjects-design-studio-column-chart-981x419.jpg

reverse-lasso-in-sap-businessobjects-design-studio-columnchart-981x419.jpg

This can be achieved in pie charts as well.


reverse-lasso-in-sap-businessobjects-design-studio-pie-chart-981x419.jpg


reverse-lasso-in-sap-businessobjects-design-studio-piechart-981x419.jpg

To incorporate the reverse lasso feature, you would require a simple script:


Capture.JPG

 

In the above script, ‘previous_selection’ is a global variable and is initialized with null value.


A ‘CLEAR SELECTION’ button is also added to clear the reverse lasso selection. On clicking this button, the filter is also cleared and the global variables are also set to null values. The script on the button is as follows:


Capture2.JPG


In a scatter plot, the reverse lasso feature works in a similar fashion. Sometimes a Scatter plot may get crowded at a particular point. This feature allows the user to declutter the cluttered part for better clarity. In the following image, reverse lasso selection is applied to a crowded part in a Scatter plot.

 

reverse-lasso-in-sap-businessobjects-design-studio-scatter-plot.jpg

 

Once the reverse lasso selection is applied, the cluttered part of the plot is removed.


reverse-lasso-in-sap-businessobjects-design-studio-scatterplot.jpg


Lasso and reverse lasso feature can be applied to all the charts. Have fun applying this very useful feature to any chart.

 


 

Visual BI Extensions - Sneak Peak

$
0
0

Some people might have recognized as part of our roadmap of Visual BI Extensions that we are working on some very interesting components for SAP BusinessObjects Design Studio and today I thought I will keep the text short and share some important milestone simply in form of a video.

 

The video shows a component that will enable you to create responsive dashboards that we are working on as we speak and that will come out soon.

 

Design Studio SDK - Hexagonal Binning

$
0
0

This component I've had for quite some time in the SCN SDK Community pack, but never had the time to spend blogging about it until now.  I've taken the time to show it now, as I've used it as a use case of porting it over as a Lumira Visualization Extension as well.  (SAP Lumira Visualization Extension - Hexagonal Binning)

 

So what is it?  A HexBin Chart allows us to visualize x/y data in a bit of a different way.  Traditional Scatter Plots and Bubble Charts are good at showing correlations (or lack thereof) such as below:

 

hex1.png

A Scatter Plot showing Hits (x-axis) compared to unique visitors (y-axis).

 

The example above is a manageable visualization because of the low volume of data points where the legend and colors are identifiable and can for the most part be distinguished from one another.

 

For larger data points, this may not be as useful:

hex2.png

A Scatter Plot showing 2000 data points.  Or a broken gumball machine.

 

This visualization doesn't seem to be as useful.  There's no indication if there's a certain area of more plot density than another.  Generally, the data points seem to be within a range of 0 to 500 and 200 to 700, but how uniform is the distribution?

 

I took a look at some of Mike Bostock's examples and liked what I saw with his HexBin example here: Hexagonal Binning

 

Let's look at the HexBin's representation of this same data:

 

hex3.png

A HexBin using 'Median' sampling to set color binning.

 

As you can see above, we can use hexagonal binning to start binning certain thresholds of density into a color scale (dictated in color and occurrence by your color palette).  I have 3 automated options to try to bin them.  Above was using Median, and below we see two others.  Depending on the profile of your data, one may work better than another:

 

hex4.png

Mean and Max methods shown.  Same data, but note the difference in the color distribution thresholds in the legend.

 

And finally, I have a 'Manual' Method where you can manually set the low and high to distribute across.  I've set the low tolerance to 20 and the upper threshold to 100 in this case to peg the color scales to that range:

 

hex5.png

A focused coloring range from 20 to 100.

 

Next, suppose you need a little more fidelity or less fidelity in your hexagon bins.  I have a radius parameter that you can control how large the hexagons are.  Below are examples of different sizes and colors for sake of variety:

 

hex6.png

A smaller hexagon size with a multi-hue color range.

 

hex7.png

A larger hexagon size with simpler color range

 

And finally, below are some quick YouTube recordings I did a while back showing how you can even us BI Action Language at runtime to make this truly interactive:

 

 

 

Feedback always welcomed.  You can download this in the package available here:

 

SCN Design Studio SDK Development Community

 

Enjoy!

Design Studio 1.5 Geo Map Component Configuration with SAP BIP Universes

$
0
0

This post focuses on how to configure the Geo Map component with a Universe selected as the data source. The DS 1.5 documentation has detailed instructions for configuring the Geo Map with BW and HANA which should be reviewed before building the application. These instructions are applicable when a Universe is selected as well, however there are specific IDT and component configurations necessary when working with a Universe.

 

It’s important to review the DS User Guide section “Working with Geo Maps”, and to review SAP Note 2166923Working with SAP BusinessObjects Design Studio 1.5 Geo Maps” before configuring the component since it behaves differently than mapping component extensions and those found in Lumira and Dashboards (aka Xceslius).

 

If you’re just getting started with Geo Maps I recommend reviewing the following posts in addition to the user documentation.

 

SAP Tutorial: Display a Geo Map Component

Creating Custom GeoJSON maps in Design Studio 1.5 - Part 1 of 2

Creating Custom GeoJSON maps in Design Studio 1.5 - Part 2 of 2

Design Studio Innovation Series - Welcome

Design Studio Innovation Series - Topic 6: Geo Maps Part I - Feature Review

Design Studio Innovation Series – Topic 7: Geo Maps Part II – Zoom, Zoom, Zoom!

 

While many mapping components allow the use of measures or dimensions as data sources when configuring a map, the DS Geo Map component requires a Universe sourced component to configure the Lat/Long values as attributes in the Universe as shown in the example below.

 

unx_class.png

 

The attributes and dimensions are used in the following example of a Geo Map that has two layers:

·       A point layer named LOCATION which uses the Lat/Long attributes. I’ve set this as the top layer because I want the state outlines to show below the points.

·       A shape layer named STATE which maps to the State dimension. This layer requires a GeoJSON file that contains shape information such as US State outlines. When in local mode this file must exist in the application folder, while in BIP mode you can click the ellipse icon in the “Custom GeoJSON File” field to upload it into BIP.

 

map.png

 

After the Universe is published, create a new DS application and add the Universe as a data source. Right-click on the data source to set the initial view, then expand the node where the Lat/Long attributes are and right-click to add them to the Rows container as shown below.

 

EditInitView.png

 

Next drop a Geo Map component onto the canvas and configure the Additional Properties section of the component to map the Latitude and Longitude attributes as shown below.

 

location_props.png

 

To configure a shape layer create another data source and be sure the initial view of the new data source contains the dimension that will map to the GeoJSON file you added.

 

state_props.png

Layers in the Geo Map component can be highly interactive through the use of scripting. Please review the posts listed above, including the comments others have added to the posts, for information on how this is accomplished.

Design Studio 1.6 Feature Sneak Preview - CSV Data Sources

$
0
0

There is a demo app, built my colleagues on the Design Studio PM team, Christina Mast and Bettina Denonville, that we've been showing to customers lately.  I'd like to share it with the community for a couple of reasons.  Firstly, it demonstrates the kind of things that Design Studio is capable of, in the hands of a skilled designer, when extensions are brought into the mix.  The application in question uses a couple of components from the Design Studio SDK Development Community.  Specifically, it uses the Facet Filter Component and the Date Range Slider, to build a data exploration app.  The user interface is dynamic, allowing the user to toggle between chart, crosstab and chart/crosstab combo display, while expanding and collapsing the chart picker and navigation page as desired.  With the data range slider, the user can, with the flick of a mouse or a finger, set the desired data range.  With the facet filter, the user can perform guided data exploration in the style of Lumira or Explorer, but in a custom application.

 

But that's not the real reason for this post.  If you download app and look at it in the designer, you notice that it carries its own data with it.  This is the first sneak preview of Design Studio 1.6's CSV data provider.  This is a useful data source to use, if there are only small amounts of data and it is static.

 

Screen Shot 2015-08-11 at 13.52.11 (2).png

 

Prerequisites:

 

  • Design Studio 1.5 SP1.  (this version can consume existing CSV data sources, but the UI machinery to create new data sources will be available in 1.6)

 

  • The Design Studio SDK Community Extension pack needs to be installed.  The easiest way to do this is to select Tools -> Install Extension to Design Studio... and enter the URL for the Community SDK extension pack's installer URL.

 

Installation:

 

 

  • Copy the contents of the zip (the .csv files and the BIAPP) to the root of the Design Studio repository.  The CSV files should reside in ..\Analysis-workspace\com.sap.ip.bi.zen\repository and not in the app directory itself as in the picture below.  (I have 6 .csv files, as this is not the only app I have that uses CSV data sources.  The data exploration app uses 4).

 

Import/Export does not yet work with CSV data sources, so you have to install it the old fashoned way.

 

Screen Shot 2015-08-11 at 17.32.49 (2).png

How to visualize ‘Others’ in SAP BusinessObjects Design Studio?

$
0
0

We always get requirements from our clients to display data in their dashboards by order of rank.  For example, many clients would like to display Top N customers in a chart based on their profitability. Additionally, many business users are more interested in looking into the share of Top performers when compared to collective performance of others


In this blog, I will explain the steps to achieve visualization for Top Customers and Others within the same chart.


Our Scenario

We need to visualize the Top 5 profitable customers as well as the profitability from all other customers in a chart.

Currently, there is no direct method in SAP BusinessObjects Design Studio to do this: modify and visualize the data for ‘Others’. However, there is a very simple workaround to achieve this scenario.

Workaround Steps

  1. Create a Query (Q1) in SAP BusinessExplorer (BEx) and define the condition as Top 5 for profitability Keyfigure.
  2. Create a Query(Q2) in SAP BusinessExplorer (BEx) with customer dimension restricted for a variable and with replacement path of Query( Q1)
  3. Create a Query (Q3) in SAP BusinessExplorer (BEx) with 6 selections for customers dimensions restricted with input variables – The values for these variables will be passed from SAP BusinessObjects Design Studio.
  4. Import Q2 and Q3 in SAP BusinessObjects Design Studio and get Top 5 members using getmembers() function from Q2.
  5. Pass the Top 5 members values to Q3 using setVariable() function.
  6. Assign a chart / crosstab to Q3 to visualize Top 5 and Others

Using-getMembers-in-SAP-BusinessObjects-Design-Studio-for-a-BEx-Query-with-condition.png

Since there is a conflict of retrieving the members of a query using condition, to resolve this, we will have to use another query Q2 which does not have a condition and has a replacement path variable from the query Q1. For more information on how to resolve the conflict, please refer to my previous blog on this subject.

Steps for achieving the logic

Step 1

Create a Query (Q1) in SAP BusinessExplorer (BEx) with Top 5 condition Rows – Customers

Columns – Profitability

Query-in-SAP-BusinessExplorer-BEx.png

Define a condition for Profitability with Top N Operator and Value as 5.

Conditions-in-SAP-BusinessExplorer-BEx.png

Step 2

Create a copy of the Query (Q1) and remove the condition.

Restrict the customer’s dimension using a variable with the replacement path from Q1.

In the General tab, give Replacement path under the Processing By option.

Variables-in-SAP-BusinessExplorer-BEx.png

In the Replacement Path tab, select Query under the ‘Replace variable with’ option and type the technical name of query Q1.



  

Replacement-path-in-Variables-in-SAP-BusinessExplorer-BEx.png

Follow the same procedure for all the 5 selections.

Name the 6th selection as “Others”. Exclude the 5 input variables for Customer dimension.

Selections-in-SAP-BusinessExplorer-BEx.png

Step4

Add Q2 and Q3 as datasources in SAP BusinessObjects Design Studio. Assign Q3 to a chart and a crosstab.

Step 5

In the startup field of application property in SAP BusinessObjects Design Studio, give the following script:

var topcustomers=DS_1.getMembers("ZR_CUST", 1000); // Getting top 5 members from Query 2

topcustomers.forEach(function(element, index) {

if(index==0) // First Customer

{

APPLICATION.setVariableValue("ZKAR_VAR_C1", element.internalKey); // Passing this Customer

to the input variable 1 we have in Selection 1

}

if(index==1)

{

APPLICATION.setVariableValue("ZKAR_VAR_C2", element.internalKey); // Passing this Customer

to the input variable 2 we have in Selection 2

}

if(index==2)

{

APPLICATION.setVariableValue("ZKAR_VAR_C3", element.internalKey); // Passing this Customer

to the input variable 3 we have in Selection 3

}

if(index==3)

{

APPLICATION.setVariableValue("ZVAR_KAR_C4", element.internalKey); // Passing this Customer

to the input variable 4 we have in Selection 4

}

if(index==4)

{

APPLICATION.setVariableValue("ZVAR_KAR_C5", element.internalKey); // Passing this Customer

to the input variable 5 we have in Selection 5

}

});

/* Selection 6 (Others) gets all 5 input variables and excludes them */

 

Step 6

Now run the Application.

Visualizing-Others-in-SAP-BusinessObjects-Design-Studio.pngVisualizing-Others-in-SAP-Design-Studio.png

 

Conclusion and Considerations

You have now successfully achieved the ability to visualize‘Others’ data in a chart in SAP BusinessObjects Design Studio using this workaround.

Some limitations to consider:

  1. If the number of Top customer changes dynamically, this method cannot be implemented as we are defining the number of selections in Query Q3.
  2. If the number of Top customers is as big as 20, this approach will work but passing 20 variables from Design Studio to BEx will drastically slow down the performance of the application.

To summarize, if the number of Top customers are less and does not change dynamically, you can use the above-mentioned steps to visualize Others in the chart.

I hope this blog was helpful to you

 

 

 

 

 

 

 

 

.

Design Studio Templates Webcast Part 1 - No Coding Required

$
0
0

This was a SAP webcast this past week covering Design Studio 1.5 templates.  The usual legal disclaimer applies.

 

1fig.png

Figure 1: Source: SAP

 

This webcast covered the templates shown in Figure 1.  This blog only covers the Generic Analysis template.  I just realized in pulling together this blog is that no coding is required with these templates.  In theory a business analyst or power user could use these templates without involving "IT".

2fig.png

Figure 2: Source: SAP

 

Predefined template

 

Slicing and dicing of data sources

 

Do not assign data source at design time but at run time

 

BW or HANA can be a data source

 

Can only BIP or NetWeaver mode

 

Use on Desktop browser only

 

Share PDF in offline mode

 

3fig.png

Figure 3: Source: SAP

 

So following the steps in Figure 3, you give the application a name, select Generic Analysis Template and then run the application.

4fig.png

Figure 4: Source: SAP

 

After executing the application you are prompted for the data source

5fig.png

Figure 5: Source: SAP

 

Figure 5 shows the option to change data source, bookmark, export, context menu and filter

6fig.png

Figure 6: Source: SAP

 

Figure 6 shows changes available at run time when the chart is being used.  Traditionally these are settings at design time.

7fig.png

Figure 7: Source: SAP

 

Figure 7 shows the available chart types in the template

8fig.png

Figure 8: Source: SAP

 

Figure 8 covers the first part of the menu.  One item to add - it was helpful to follow along with my own data sources and templates to this webcast to realize the features available.

 

9fig.png

Figure 9: Source: SAP

 

This template has only 1 chart, 1 cross tab

 

If want to build more, new data source selection

10fig.png

Figure 10: Source: SAP

 

The bookmark features are built into this template.

11fig.png

Figure 11: Source: SAP

 

Save a particular view or app as a smart object

12fig.png

Figure 12: Source: SAP

 

Two folders created for 1 app - one for images, the other for the actual app

13fig.png

Figure 13: Source: SAP

 

Different folders to save portable fragments on bookmarks

 

To be continued...

 

Question and Answer

Q: What are all the data sources supported? any increase from 1.4?

A: Design Studio supports BW, HANA and universes - see http://help.sap.com/businessobject/product_guides/AAD15/en/ds_15_user_en.pdf - "for relational single source universes"

 

Q: Can we use this Generic Analysis feature with universe or excel data source?

A: BW or HANA; No its not possible to use it with Universe datasources.

There is limited support for .Unx datasources

 

Q: Can you clarify if Universes are supported as data source for this template?  I am seeing some mixed comments above

A: the templates being discussed only connect to BW and HANA; generically Design Studio can connect to BW/HANA/Universes

 

Q: can we connect to multiple data sources

A: Yes

 

Q: in Generic Analysis we can create multiple visulization or just one in the dashboard

A: yes; she said she would demo

 

Q: Can we leverage data from say HANA as well as Universe to create an analysis both in on-line and off-line mode?

A: the universes cannot be used with these templates

 

Q: where can we leverage Universes?

A: you can create a blank application against universes - there are other template types too

 

Q chart library used here is D3? same as in Lumira?

A: CVOM library, I believe

 

Q: is there any plan to let users bring in their Lumira Viz Extensions into the Generic Analysis template?

A: You should be able to customize Generic Analysis template if you want by integrating extensions.

It is just a template

 

Q: How can you create your own templates?  Is there a way to take a HTML page and convert it to a Design Studio template?

A: you can import/export, and there are also documents on SCN that cover this

Design Studio is a HTML5 based app.

 

Q: But is there an option to "generate" a template from a HTML page? Design Studio will generate the dashboard as a HTML5 page.  But can you actually take an existing web page and somehow convert it/save it as a design studio template that I can import and use on other dashboards

A: There is a specific format attached to Design Studio apps, which you can import and export. You can certainly apply custom .css scripts to create the look and feel of your custom html page.

 

Q: Is there some documentation on that specific format?  How can I create my own templates (without exporting an existing template)

A: Yes, please refer to the help page documentation as it gives you all the details: http://help.sap.com/boad.

 

Q: can a story board created in Lumira be used as a starting point to create an app in DS?

A: not today; you can export to Lumira from Design Studio - not the other way

 

Q: Can we use this template for Mobile?

A: Once it is published to BIP, yes it can be consumed via MOBI

 

Q:  It seems General analysis is nothing but Explorer and Data Discovery template is nothing but Lumira, if customer have BI enterprise with Lumira and Explorer tools available , does this template make any sense for them?

A: Lumira is BW offline, Design Studio can use BW online data sources

 

Upcoming ASUG SAP Design Studio Events/Items of Interest

On Monday, October 19, ASUG is offering a SAP Design Studio Deep Dive full-day hands-on session at SAP TechEd Las Vegas - see Announcing ASUG SAP TechEd Pre-Conference Sessions - Open for Registration

 

ASUG BusinessObjects Design Studio Sessions at #SABOUC in Austin

 

ASUG Webcasts:


Dynamic Casading Listbox or Dropdown with UNX backend (using existing datasources)

$
0
0

I was a bit surprised to find that dropdowns and listboxs do not work with Universe Data Sources the same way they do with BW Data Sources.

While there are solutions out there to implement cascades with your selections, they either involve creating your own with the SDK or using a trick with multiple data sources.  The multiple data source solution works just fine, but it adds more data sources when most of us are trying to reduce the number of data calls we have.

 

I created a lightweight solution that uses a single global script to parse out an array of concatenated cascade values to listboxes.  The script is called on start and on change events and it allows for multiple selections from any list.  It requires you have access to your universe and can create a dimension.

 

web.png

For this writeup, I am using a 3 tiered cascade of Region -> Country -> City.

 

  • In Information Design Tool, create a new dimension that references your cascade in order, and concatenates the values.   In my case, I created a dimension called City_Hier_Concat.  With an Oracle backend (I'm not sure if it's different for other backends) I concatenate with double pipes ||. My dimension definition is simply:

    @Select(Office\Region) || '|' || @Select(Office\Country) || '|' || @Select(Office\City)

               This should output a string of Region|Country|City separated by a pipe character.

 

  • Add this new dimension to your existing datasource that contains your dimensions you will filter against.
    • Set your initial view to what it was previously.  It is not necessary to add this new dimension to the initial view. 
      query.png
  • In my layout I created 3 listboxes and a crosstab.  I labeled the listboxes LB1, LB2, and LB3 and set the crosstab datasource. 
    Outline.pngCanvas.png
  • I created a global script set called Datafill, and a script called LB_CASCADE.
    • LB_CASCADE expects a single integ
      GlobalScript.png
    • The LB_CASCADE script:

 

//Assign concatenated list to array variable
var arraymembers = DS_1.getMembers("<city_hier_concat>", 250);
//Initialize string variables to hold each member once concatenated list is parsed out
var LB1_ELEMENT = "";
var LB2_ELEMENT = "";
var LB3_ELEMENT = "";
//Depending on entry point, clear and set default to *All text (null value) for lists
if (pLB == 0) {  LB1.removeAllItems();  LB2.removeAllItems();  LB3.removeAllItems();  LB1.addItem("", "*All");  LB2.addItem("", "*All");  LB3.addItem("", "*All");  LB1.setSelectedValue("");  LB2.setSelectedValue("");  LB3.setSelectedValue("");
}
else if (pLB == 1) {  LB2.removeAllItems();  LB3.removeAllItems();  LB2.addItem("", "*All");  LB3.addItem("", "*All");  LB2.setSelectedValue("");  LB3.setSelectedValue("");
}
else if (pLB == 2) {  LB3.removeAllItems();  LB3.addItem("", "*All");  LB3.setSelectedValue("");
}
//Get selected values from lists and assign to variables
var LB1SELECT = LB1.getSelectedValues();
var LB2SELECT = LB2.getSelectedValues();
var LB3SELECT = LB3.getSelectedValues();
//Loop through concatenated list, split out members and assign to element variables
arraymembers.forEach(function (a , index) {  var elementsplit = a.text.split("|");  var x = 0;  elementsplit.forEach(function (b , index) {  if (x == 0) {  LB1_ELEMENT = b;  x = x + 1;  }  else if (x == 1) {  LB2_ELEMENT = b;  x = x + 1;  }  else if (x == 2) {  LB3_ELEMENT = b;  x = 0;  }  });  //Depending on entry point, check to see if elements match selection or if *All is selected (null value)  //if matched, assign child members to appropriate listbox  if (pLB == 0) {  LB1.addItem(LB1_ELEMENT, LB1_ELEMENT);  LB2.addItem(LB2_ELEMENT, LB2_ELEMENT);  LB3.addItem(LB3_ELEMENT, LB3_ELEMENT);  }  else if (pLB == 1) {  LB1SELECT.forEach(function (c , index) {  if (LB1_ELEMENT == c || c == "") {  LB2.addItem(LB2_ELEMENT, LB2_ELEMENT);  LB3.addItem(LB3_ELEMENT, LB3_ELEMENT);  }  });  }  else if (pLB == 2) {  LB2SELECT.forEach(function (d , index) {  if (LB2_ELEMENT == d) {  LB3.addItem(LB3_ELEMENT, LB3_ELEMENT);  }  if (d == "") {  LB1SELECT.forEach(function (c , index) {  if (LB1_ELEMENT == c || c == "") {  LB2.addItem(LB2_ELEMENT, LB2_ELEMENT);  LB3.addItem(LB3_ELEMENT, LB3_ELEMENT);  }  });  }  });  }
});
//Sort Results
LB1.sort();
LB2.sort();
LB3.sort();
//Set appropriate filters to selected elements. 
//Since *All texts are set to null values, selecting *All will essentially clear that filter.
DS_1.setFilter("<region>", LB1SELECT);
DS_1.setFilter("<country>", LB2SELECT);
DS_1.setFilter("<city>", LB3SELECT);
  • Finally call the script:
    • On Startup:  DATAFILL.LB_CASCADE(0);
    • LB1 On Select:  DATAFILL.LB_CASCADE(1);
    • LB2 On Select:  DATAFILL.LB_CASCADE(2);
    • LB3 On Select:  DATAFILL.LB_CASCADE(3);

 

 

 

That's it!

 

I am sure the script can be improved upon.  I may add input field searches to the lists as well.

 

There are some caveats and notes:

  • LB1 is always static.  With unscripted, normal cascade filters from BW sources, I believe that once you make a selection LB1 would filter itself down as well, and you'd have to click a button to clear the filters.  I prefer how this functions over how BW sources would function.
    • With LB1 always being static, you cannot use the built in Property Binding Filter option on LB1.  Regardless, I set the filters manually in the script.
  • You can create a button and assign DATAFILL.LB_CASCADE(0); to the button to reset the filters.  Or you can just select *All from LB1 to do the same. 
  • *All will appear even if there is only a single value present in the list.  I prefer this to happen, although you can easily check if a single value exists and skip adding *All. 
  • You should be able to easily scale this solution out to more tiers based on your requirements.  However, this is 3 tiers with almost 250 elements per tier and it relies on nested loops.  With my data of 250 elements, the bottom cascade ends up looping through 250 times initially, and then 250 times inside each initial loop for a total of 62,500 loops.  It happens in milliseconds.  You may have a different experience once you begin adding more tiers and more elements.  I have not tested this.
  • This should be able to be used with dropdowns exactly the same.  I have not tested this. 

 

 

Good luck and Happy Cascading!  Feedback, suggestions, improvements are always welcome, and I will update accordingly.

 

Chad

Design Studio SDK - Progress Bar Set Makeover

$
0
0

This is one of a few face lifts I'll be giving to some old components.  A while back I created a quick and dirty component called 'Progress Bar Set' that I blogged on here:

 

Design Studio SDK (1.3) - D3 fun making a Progress Bar Set/Bar Chart

 

That component was OK however it was not data bound and only allowed for 'manual entry' of data in the APS and in BI Action Language.  I've revamped this component and included it in the 'Databound' category for those who would like a more straightforward way to bind the data to this component.  Below is a quick video showing the data binding as well as the new unified Additional Properties sheet on display:

 

 

The old 'Prototype' will still be available for manual use cases, but this version will make for a nice data bound use case.

 

Available shortly for install via SCN Design Studio SDK Development Community

Visual BI Extensions for SAP BusinessObjects Design Studio .... now certified by SAP

$
0
0

It is with great pleasure this morning that I can write this blog and share that our Visual BI Extensions for SAP BusinessObjects Design Studio now have officially been certified by SAP based on the certification for SAP BusinessObjects Design Studio (BI-DSTUDIO 1.0).

 

It makes me even more proud that so far (August 2015) we are the first and only company that has their Extensions for SAP BusinessObjects Design Studio certified on the official certification by SAP (BI-DSTUDIO 1.0). Here the official listing of companies.

 

Our Extensions are adding components in four main areas : Charts, Maps, Utilities, and Filter.

 

 

Here are the links to some short videos highlighting some of our extensions:

 

http://visualbi.com/sap-design-studio/dsx-extensions/charts/

http://visualbi.com/sap-design-studio/dsx-extensions/maps/

http://visualbi.com/sap-design-studio/dsx-extensions/selectors/

http://visualbi.com/sap-design-studio/dsx-extensions/utilities/



Our Extensions add functionality such as drill down capabilities or the ability to use hierarchies as part of the charts, or the ability to use a true hierarchical filter.


Here just a few examples of what is possible:




In case you are at the SAP BusinessObjects Analytics Conference next week, come and see me for an Overview of our Extensions and some Best Practices for SAP BusinessObjects Design Studio.



Link to the official Press Release:

http://visualbi.com/blogs/news/visual-bi-extensions-solution-for-sap-businessobjects-design-studio-achieves-certified-in…

Tutorial for creating a simple Custom Data Source (Part 2)

$
0
0

Hello, and welcome back to this three part series on creating custom data source extensions for Design Studio. As mentioned in the title, this is part 2, and part 1 can be found here. With these blog posts, I hope to help first time developers explore and understand the various intricacies of the Design Studio SDK.


In part 1, we saw how we can create a rudimentary data extension to access JSON data from the World Bank API. We covered what an SDK extension is made of, how to define an SDK extension, and how to fetch and push data into a Design Studio component using JavaScript.

 

BI Action Language and the Script Contribution File

Now the extension I’d developed would provide the end user with very little functionality; all the power lay with the Analysis Application developer. The end user had no control over the data they were consuming. So how do we provide end users with this control?

The answer is BIAL scripting. BIAL stands for BI Action Language, and BIAL scripts are used to enable user interaction at runtime. The application designer write scripts that are executed when the user performs an action in the executed application. For example, you can place the button component in the application and assign a script to the button's On Click event.

 

In the Design Studio script editor with the help of BIAL, you can access the properties of an extension component with Design Studio scripts by adding a Script Contribution file contribution.ztl to the same folder as the Contribution XML. The purpose of the Script Contribution file is to define setter and getter functions for the properties defined in Contribution XML. These functions can then be called using the BIAL scripts.

 

A few pointers on the Script Contribution file:

 

  • The content of contribution.ztl is a mix of Java syntax (script method signatures) and JavaScript syntax (script method bodies).
  • Enclose script method bodies in {**} pairs.
  • Enclose method blocks within script body methods in regular braces ({}).
  • Access properties defined in the Contribution XML file with the notation this.<propertyName>
  • The following types are available:
    • String
    • Int
    • Float
    • Boolean
    • Comments are automatically included in content assistance and tooltips of the Design Studio script editor.

 

 

 

Let’s look at an example of a Script Contribution file.

 

class com.tcs.worldbankdatasource.WorldBankDataSource extends SdkDataBuffer {}

 

class com.tcs.worldbankdatasource.WBDynamicDataSource extends SdkDataBuffer {

       /* Sets the country parameter for the API URL. */

       void setCountries(/* Countries */ String newCountries) {*

              this.countries = newCountries;

       *}

      

       /* Sets the indicator parameter for the API URL. */

       void setIndicators(/* Indicators */ String newIndicators) {*

              this.indicators = newIndicators;

       *}

      

       /* Sets the range parameter for the API URL. */

       void setRange(/* Range */ String newRange) {*

              this.range = newRange;

       *}

}

 

As you can see it contains the script contributions for two different components, WorldBankDataSource and WBDynamicDataSource. WorldBankDataSource, the extension component created in part 1, has no script contributions and its class is left empty.

 

Coming to the script contribution for the WBDynamicDataSource, three setter functions have been provided for each of the component’s properties. The comment that precedes a function or parameter provides a description for it. Given below is an example of how these functions are called in the Design Studio Script Editor.


1.jpg

 

I’ve created a new Analysis Application which uses the WBDynamicDataSource extension component. Along with the chart and data source components, the application has three buttons; each of which will change one property of the data source.

 

  Step 1: Insert the chart component, data source and button controls, and run the application.


2.jpg

3.jpg


Step 2: Change the countries


4.jpg


Step 3: Change the indicator


5.jpg


Step 4: Change the range


6.jpg


Conclusion

So that is how we, as developers, can provide the end user the ability to request whatever data they want without being dependent on the application designer. While I’ve just provided buttons to change the properties to predefined values, there is scope for a lot more flexibility. You can for instance, provide drop down boxes will all the countries and indicators that World Bank provides and give the user total freedom to choose whatever value they want.

 

For the third and final entry in the series, I will explore and explain the Additional Properties Sheet HTML and JavaScript files. Till then I’m glad to answer any questions and please let me know your views in the comment section below.


Cheers!


Styling Geo Map layers through CSS in Design Studio 1.5

$
0
0

It is possible to style each layer individually through CSS for the Geo Map component. Here is an example of what a Geo Map with 2 layers will look like by default:

default.PNG

 

In order to change the style of each layer, Design Studio exposes the layer ID property as a CSS class. This allows you to style each layer separately, and for instance, change the opacity or the behavior on selection. As the classes are tied to the layer ID, showing or hiding a layer will have no impact on the styling of other layers.

 

Here is a CSS example illustrating how this works:


.REGION_LAYER { /* Layer ID of the choropleth layer */

  opacity:0.5; /* Default opacity for the layer */

}

.REGION_LAYER.sapzengeomap-selected {

  opacity:0.9; /* Changes opacity to 90% when selected */

}

.REGION_LAYER.sapzengeomap-unselected{

  opacity:0.2; /* Changes opacity to 20% when unselected */

}

.BUBBLE_LAYER { /* Layer ID of the bubble chart layer */

  opacity:1; /* Default opacity to 100% */

  stroke-width:1; /* Adding a white stroke around the bubbles */

  stroke:white;

}

.BUBBLE_LAYER.sapzengeomap-selected { /* Changing the fill and stroke when selected */

  stroke: black;

  fill: red;

}

.BUBBLE_LAYER.sapzengeomap-unselected { /* Changing the opacity when unselected */

  opacity:0.1;

}

 

 

The result is illustrated in the two figures below:

new_1.PNGnew_2.PNG

Viewing all 662 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>