Focal Point
[CLOSED] How To Create Concentric Circle Map

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5027081296

December 18, 2019, 09:47 AM
WFConsultant
[CLOSED] How To Create Concentric Circle Map
Is there a way to create a concentric circle map in WebFOCUS?

An example can be found in the sample.

Thanks in advance.

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8207.11
App Studio 8207
December 18, 2019, 11:41 AM
FP Mod Chuck
wfconsultant

You should be able to use the D3 extension to reference a concentric circle map. Search for D3 there are a lot of references of how to use.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
December 19, 2019, 10:33 AM
WFConsultant
Chuck,

Thank you for the suggestion. I could not find any sample in D3. Do you have any links you can suggest?

Thank you


WebFOCUS 8207.11
App Studio 8207
December 19, 2019, 10:41 AM
FP Mod Chuck
WFConsultant

I googled "d3 concentric circle map" and got a lot of hits.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
December 20, 2019, 12:25 PM
WFConsultant
It is true that we get lots of hits when googling. However, none of them are relevant.

There is this function, GIS_GEOMETRY, in WebFOCUS that may create geometric area on the map. I am not able to get a sample data to test this function.

I am wondering if anyone has worked with the function (GIS_GEOMETRY).

Please let me know.


WebFOCUS 8207.11
App Studio 8207
December 22, 2019, 11:40 PM
StuBouyer
You want to have a look at the IbComposer_drawBullseye javascript function.

It is explained in the "Using Javascript for HTML Canvas" section of the App Studio online help

I'll see if I can dig my old examples on how to use

Cheers

Stu


WebFOCUS 8.2.03 (8.2.06 in testing)
December 24, 2019, 10:01 AM
Andy Kirby
I'm probably over simplifying this but does the Proportional Symbol Chart not give you this if you use the Size, Color and Location attributes? You can change the ring size and color etc in the style sheet but this is the basic effect.

Dropbox_Image

Hope that helps

Andy

WebFOCUS 8.2.06
December 24, 2019, 05:49 PM
WFConsultant
Thank you StuBouyer and Andy Kirby. Both the ideas look good.

@StuBouyer - The JS function, IbComposer_drawBullseye, is the best solution. In the function, we can set the center latitude/longitude, set radius of multiple circles and colors for each circle. Somehow, it is not rendering for me. I am still working on it.

@Andy Kirby - If the above solution doesn't work then I guess this may be a workaround. This require creating dummy data. For ex, if I want 3 circles, then the data would have 3 records with same latitude/longitude and different measures values. If I put the measure field in the Color bucket then the concentric circles will render. I'll have to see if it is possible to control the size of the circles.

This message has been edited. Last edited by: WFConsultant,


WebFOCUS 8207.11
App Studio 8207
December 26, 2019, 05:10 PM
vaayu
Make sure you have the GoogleMaps API Key installed on the client, I believe it in Admin console somewhere.


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
December 30, 2019, 05:07 PM
Doug
I think that I speak for all of us here. We'd love to see the end result with some sample data.
December 31, 2019, 04:03 PM
WFConsultant
The function, IbComposer_drawBullseye, only works on the Google maps (No ESRI or Leeflet)
It works only in App Studio (No InfoAssist)

Fex (geo_con_circles.fex):
-------------------------
This fex is not mandatory for the concentric circles. This put customers on the map.

SET ASNAMES = ON

TABLE FILE WF_RETAIL
SUM
ID_CUSTOMER
COMPUTE MARKER/A10 = 'blueicon';
BY ID_CUSTOMER
BY ADDRESS_LATITUDE AS LATITUDE
BY ADDRESS_LONGITUDE AS LONGITUDE
WHERE CITY_NAME EQ 'Dallas'
WHERE STATE_PROV_NAME EQ 'Texas'
WHERE BUSINESS_REGION EQ 'North America'
ON TABLE PCHOLD FORMAT XML
END

HTML(geo_con_circles.htm):
-------------------------
Created a Request, geo_con_circles, to read the above fex.
Put Map control on the canvas.
In the map control settings, did the following.
Center Location: Dynamic
Location Type: Latitude/Longitude
Request: geo_con_circles
Visible: Checked
Image/Tooltip: Tooltip
Source Type: Constant Value.

Put a button on the canvas.

In the button click event added the following JavaScript code.

IbComposer_drawBullseye('mapcontrol5',37.0625,-95.677068,'true','mi',3,'20,30,40','Green,Orange,Red');

The values, 37.0625,-95.677068, are the latitude and longitude of the city of Dallas.

When the HTML ran, the map puts all the customers on the map.

When button is clicked the concentric circles rendered on the top of the map.

Output from the above code

This message has been edited. Last edited by: WFConsultant,


WebFOCUS 8207.11
App Studio 8207