Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
RSvebeck
Specialist
Specialist

Conceptual integration with Vector Graphics and Raphael JavaScript Library

Hi


I'm working on a conceptual rapael integration extension for Qlikview which I plan to publish on the forum for everyones free re-use as soon as I have solved these two issues (see below).


My idea is to handle the vector graphics in the documents "source database" and let the extension draw vector paths based on that data in Qlikview.


I'm writing it so that almost anyone with some programing skills can undertand and take over for their own purposes.
(I try to put comments on all rows in my code... !)


I'm quite far in the process and already have a prototype that is working quite ok.


This template reads path data of Sweden in the load script, when the Extension activates it draws a map of Sweden with qlickable regions. It is now very easy to just replace the paths and regions of sweden into any other paths. Could be a map of the world, or a floor plan or whatever.

But ....

There are two annoying things that I can not get to work.
To be able to understand my issues, you need to download my .qar, install it and test it.(Everything required is in the qar)


1. I can't get the read from document variables to work. If I can get this to work, I can control to color setup of the extension object more dynamic. I have removed all attemts for this in this code since I don't get anwhere on this issue. Please guide me into the right direction.


2. There is a strange bug in my extension that I don't understand. If I select any region on my map -> exit the "Web mode" -> clear all selections Enter "Web mode" again  -> the complete map is not redrawn (ony the last selected region is drawn). Why? All dimensions are in the extension. I find this very strange. Seems like the extension object store selections in some way which is not fully connected to normal selections/deselections.


Best Regards, hope to get some assistance. I think this project will be useful for many installations of Qlikview.


Robert

Svebeck Consulting AB
15 Replies
Not applicable

Thanks Robert for your effort, this is very useful.

A problem raised when I tried to use it to draw a store map with having over 400 individual parts. It seems it loads only the first 40 segments and nothing after. Has anyone encountered this before, or is it just me doing something silly?

There is a variable called MaxPaths in Script.js

MaxPaths = myData.Rows.length

This MaxPaths variable gets maximum of 40 even though I’ve got more rows loaded in the QV. When I tried to override it with a larger (>40) number the map isn’t drawn at all. A lower value (<40) draws the map with exactly that number of segments.

There is nothing wrong with the map definitions i.e when all the segments are added to a single string, it draws the whole store map without a problem. But I need each and every segment to be selected similar to the Sweden map example.

Is this a limitation in raphael/Qv extension?

RSvebeck
Specialist
Specialist
Author

Hi!

Adjust the definition.xml file by adding the PageHeight parameter in the following way:

<ExtensionObject Label="Raphael Integration" Description="Raphael Integration" PageHeight="400">


If this PageHeight is not defined, the extension load by default only 40 rows.

Best Regards Robert

Svebeck Consulting AB
Not applicable

Thank you Robert, adding the PageHeight solved the problem. Thank you once again.

Not applicable

I want the path for the Entire world, How can i get . do you have the excel file

Not applicable

Robert Svebeck Kindly share if you have the data for the entire world.

Not applicable

Rob

   I need the data for the Entire world, my reports talk over all sales about each regions + countries across. Can you kindly share If you have path.xls file if you have any with you or kindly let me know how can i get it.

Thanks

Srini