Qlik Community

QlikView Extensions

Discussion Board for collaboration on QlikView Extensions.

Highlighted
joaquinlr
Valued Contributor II

SGV Maps and color expression

Hi:

I've a world map that shows correct data, I've this color expression

= IF (Rank(Sum(Visits)) <= 5, Blue(), Green())

I have two problems:

1) Sometimes the north-west africa countries borders dissapear

2) The green color doesn't darker or lighter depending on sum values

You can see this in the attached image.

Image.PNG.png

Thank you

Tags (4)
13 Replies
Partner
Partner

Re: SGV Maps and color expression

HI Joaquin,

Have you compared the functionality towards the "Extensions Example.qvw" sample document in the QlikView Desktop product?

Perhaps that'll give you a hint. Otherwise, a sample document and/or the extension is needed.

Regards,

Erik

jsaradhi
Valued Contributor

Re: SGV Maps and color expression

what do you have in measure field? use Rank(Sum(Visits)) or sum(Visits) in your measure field to get the gradients within each color. hopefully, this will fix the first issue too.

i have noticed the first issue on my end which usually results from an error in one of your expressions. take a closer look at your expressions in each field in the extension and make sure they are correct and have no syntax issues.

question - this is the standard svg map extension, correct? just used to looking at the US map, so it looks a little different.

joaquinlr
Valued Contributor II

Re: SGV Maps and color expression

Hi jsaradhi

I have one measure and one color expression

Measure:

= SUM(Visits)

Color Expression:

= IF (RANK(SUM(Visits)) <= 5, Blue(), GreenBlue())

How can I check that I have the correct svg-map extension, or where is it?

I got it from Community posts

Thank you

joaquinlr
Valued Contributor II

Re: SGV Maps and color expression

Hi egn


I installed the "Extensions Example.qvw" too.


I'm trying to paint an SVG map with two colors: blue() for the top five and green() for the rest.


I guess I will do it with SVG-Reader extensión. I've forgot or lost something?

jsaradhi
Valued Contributor

Re: SGV Maps and color expression

hopefully, the greenblue() in your post above is a typo or you have it defined elsewhere as there is no standard greenblue() function. also, just noticed that you do have multiple shades of green and blue in your screenshot which is what you were expecting, right?

yes, svg map extension from community posts should work.

joaquinlr
Valued Contributor II

Re: SGV Maps and color expression

Hi jsaradhi


As you said it's a typo, this is the correct color expression:


= IF (RANK(SUM(Visits)) <= 5, Blue(), Green())


The shades in blue are for the top 5 in the expression, the rest must be in a intensity scale of green ... but as you can see in the pop-ups the green scale doesn't work.


Saudi Arabia must be darker than Australia, not equal than China, other green shades are out of the scale


Thanks again

jsaradhi
Valued Contributor

Re: SGV Maps and color expression

can you share your qvw with reduced data?

joaquinlr
Valued Contributor II

Re: SGV Maps and color expression

Hi jsaradhi


Here you have.


Sometimes Nort-West Africa dissapears, making tests I have lost Argentina and Chile. Sometimes the color gradient seems to work and other times not ... but I can't show it all together.


How can I check that I have the last version of SVG-Reader and of the maps?


Thanks again

Joaquín

jsaradhi
Valued Contributor

Re: SGV Maps and color expression

One thing i always do on the svg maps, assign a non white color (light grey) to Disabled Color. that should make the "lost" countries appear. also, disable element border. after making these two changes, i did not encounter the issues you seem to be having. even the color gradients look good to me. in the example, is there a specific set of selections that you encounter the color gradient issue by, so i can try and replicate it on my end?

the github site for svg map extension should have the latest version - check this thread by author of the extension:

SvgReader mapping extension now stored on GitHub