Quantcast
Channel: SCN : Blog List - SAP BusinessObjects Lumira
Viewing all articles
Browse latest Browse all 855

Migrate Bullet Chart from Lumira VizPacker Utility to SAP Web IDE VizPacker Plugin - Part 1

$
0
0

I read Dong Pan's excellent blog "Migrate VizPacker-based Lumira Visualization Extensions to Web IDE" and wanted to check for myself that the migration (or porting) is that simple.

This blog provides a very detailed description of how I ported the Bullet chart visualization extension (from Matt Lloyd) from the Lumira VizPacker Utility to SAP Web IDE.

 

Spoiler - Yes, porting visualization extensions from Lumira VizPacker Utility to SAP Web IDE is that simple.

 

Some background information

SAP Web IDE version 1.10.2.

SAP Web IDE VizPacker Plugin version 1.1.2.

SAP Lumira Personal Edition version 1.25.1.

 

Starting Point / Pre-Requisites

 

2015-05 Vizpacker Utility Bullet.png

 

This blog expands a bit more than just the porting process. I'll present the following:

  1. Several ways to know that the SAP Web IDE VizPacker Plugin is enabled.
  2. Enabling the SAP Web IDE VizPacker Plugin.
  3. Generating an empty visualization extension project that will hold the ported Bullet chart visualization extension.
  4. Porting from Lumira VizPacker Utility to SAP Web IDE.
  5. Deploying to Lumira.

 

Due to the size of the blog I split it to two parts.

This part will cover all of the porting from the SAP Lumira VizPacker Utility to SAP Web IDE.

The second part (Migrate Bullet Chart from Lumira VizPacker Utility to SAP Web IDE VizPacker Plugin - Part 2) covers the deployment from SAP Web IDE to SAP Lumira.

 

Let's start ...

 

Is the VizPacker Plugin Enabled?

 

Once logged into SAP Web IDE, you'll see the VizPacker plugin pane icon at the right-hand toolbar and the VizPacker "Pack" icon at the top toolbar as appears in the image below. If you do not see them, it means that you need to enable the VizPacker plugin. Enabling the VizPacker plugin is described in the next section.

 

2015-05 Web IDE Plugin VizPacker Verify_.png

 

Enabling the SAP Web IDE VizPacker Plugin (also an additional way to verify that the VizPacker plugin is enabled)

 

In SAP Web IDE - Got to Tools > Preferences (see image below)

 

2015-05 Web IDE Plugin VizPacker Enable.png

 

In the screen that appears select "Optional Plugins" (see image below).

 

2015-05 Web IDE Plugin VizPacker Enable-2_.png

 

In the screen that appears - If the checkbox next to the VizPacker plugin is checked, it means that the VizPacker plugin is enabled.

If the checkbox is not checked, enabled the VizPacker plugin by checking it and then refresh the browser for the enablement to take place.

 

2015-05 Web IDE Plugin VizPacker Enable-3_.png

 

Generating an empty visualization extension project that will hold the ported Bullet chart visualization extension

 

In the Web IDE, select File > New > Project from Template (see image below).

 

2015-05 Web IDE Plugin VizPacker Bullet Port.png

 

Use the drop down to filter the VizPacker template:

 

2015-05 Web IDE Plugin VizPacker Bullet Port-2_.png

Select the "Visualization Extension" template and click "Next".

 

2015-05 Web IDE Plugin VizPacker Bullet Port-3_.png

 

Fill-in the project name. This will be the project name that will appear in the SAP Web IDE workspace.

Click "Next".

 

2015-05 Web IDE Plugin VizPacker Bullet Port-4_.png

 

Fill-in the Extension Name. This name will appear in SAP Lumira when selecting the visual extension.

Fill-in the Extension ID. When packing the extension from SAP Web IDE as well as deploying the extension to SAP Lumira, you'll use this ID.

Fill-in the version number.

You can leave the rest of the fields with their defaults.

Click "Next".

 

2015-05 Web IDE Plugin VizPacker Bullet Port-5_.png

 

Since the Bullet chart is based on SVG, make sure that the "Using SVG" is marked.

Uncheck the "Legend".

Click "Next".

 

2015-05 Web IDE Plugin VizPacker Bullet Port-6_.png

 

Click "Browse".

 

2015-05 Web IDE Plugin VizPacker Bullet Port-7_.png

 

Select the "bullets.csv" that you used when developing the Bullet chart with SAP Lumira VizPacker Utility.

 

2015-05 Web IDE Plugin VizPacker Bullet Port-8_.png

The "bullet.csv" sample data appears on the screen.

Click "Next".

 

2015-05 Web IDE Plugin VizPacker Bullet Port-9_.png

 

Create the Dimensions/Measures. Following are a few important tips:

  • Make sure that the order of them matches the order in the render.js in the Lumira VizPacker Utility. As you can see in the below image the first measure (measure (0)) is Actuals, etc.

 

2015-05 VizPacker Utility Measures Order_.png

 

  • Use the pencil marker in order to edit the Dimension/Measure name.
  • Click the "+" sign to add the relevant fields.
  • Click the "Add Set" to add an additional Dimension/Measure.

 

2015-05 Web IDE Plugin VizPacker Bullet Port-10_.png

 

Following is what you need to reach before clicking "Next".

 

2015-05 Web IDE Plugin VizPacker Bullet Port-15_.png

 

Click "Finish".

 

2015-05 Web IDE Plugin VizPacker Bullet Port-16_.png

 

The project is created in SAP Web IDE and the render.js file is opened in the editor pane.

 


2015-05 Web IDE Plugin VizPacker Bullet Port-18.png

 

Porting from Lumira VizPacker Utility to SAP Web IDE


Copy the Lumira VizPacker Utility render.js code from right under the "var render = ..." to "// END: sample render code".

Copy the segment that starts here:

 

2015-05 Vizpacker Utility Render Code_.png

 

... and ends here:

 

2015-05 Vizpacker Utility Render Code End_.png

 

Paste the code segment to the render.js file in the SAP Web IDE where the "//TODO: Add your own visualization implementation code below ..." appears.

Use the SAP Web IDE Edit > Beautify" to make the code more readable.

 

2015-05 Web IDE Plugin VizPacker Bullet Port-20_.png

 

As you can see from the "*" in the tab header the file is not saved and in the preview pane to the right, the chart is not updated.

Click the save to "Save" the render.js file and then the "refresh" to refresh teh preview pane.

What a surprise ... the chart is in the right direction, but something is wrong. All the bars are black.

 

2015-05 Web IDE Plugin VizPacker Bullet Port-21.png

 

The reason is that the CSS is not updated. We need to port is from the Lumira VizPacker Utility as well.

return to the Lumira VizPacker Utility and select the style.css tab.

Copy the content of the style.css tab.

 

2015-05 Vizpacker Utility CSS_.png

 

In the SAP Web IDE workspace expand the "style" foldel and open the "default.css" file (double click it).

Paste the code you copied from "style.css" to this file. It should completely replace all the code that was there.

Nothing changed? Do not forget to "Save" the file and click the preview pane "Refresh" button.

 

2015-05 Web IDE Plugin VizPacker Bullet Port-24.png

 

To summarize what we've done so far - The visual extension was ported to SAP Web IDE and is ready to be deployed from SAP Web IDE to SAP Lumira.

 

Continue reading ... Migrate Bullet Chart from Lumira VizPacker Utility to SAP Web IDE VizPacker Plugin - Part 2

 

 

-- Raz


Viewing all articles
Browse latest Browse all 855

Trending Articles



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