creating a chart from multiple fields

19 views
Skip to first unread message
Assigned to stefan...@geosolutionsgroup.com by lorenzo...@geosolutionsgroup.com

Arthur Lembo

unread,
Jul 18, 2024, 4:31:49 AM7/18/24
to mapstore-users
I was wondering if it is possible, or if there are plans to add the following functionality:

I would like to create a chart (bar or pie, it doesn't matter) that includes multiple fields.  For instance, let's suppose I have a map with the population of multiple races in separate fields (i.e. [black], [white], [asian]).  Is there a way to create a chart that:
  • would be able to use all three fields for a pie chart showing the values for each of the races?  Currently, it appears that you can only use a single field for the pie chart.
  • allow a chart to be created based on a selected record (i.e. link the chart to the selected record in a table, rather than all features that are in the map view).  So, in my example, let's say I click on New York.  I'd like to see a pie chart showing the racial breakdown of black, while, and asian population just for New York.  
thanks,

art

Arthur Lembo

unread,
Jul 22, 2024, 4:39:43 AM7/22/24
to mapstore-users
one thought I had, although it is not ideal, would be to transform the table, and create duplicates.  

imagine a table with 4 columns: [geometry], [white], [black], [asian]:

[geometry], [black], [white], [asian]
<g1>, 123, 202, 54
<g2> 199, 316, 211

we could transform it like a pivot table, and have the geometries duplicated like this:

[geometry], [population], [race]
<g1> 123, Black
<g2> 199, Black
<g1> 202, White
<g2> 316, White
<g1> 54, Asian
<g2> 211, Asian

lots of duplication, but maybe that's the only way to trick the table into behaving the way we want it to.  the race field could be a re

other thoughts?

Reply all
Reply to author
Forward
0 new messages