Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to set circle size less then 100 meters in deck.gl geojson chart #31176

Open
rdyatlov opened this issue Nov 27, 2024 · 5 comments
Open
Labels
viz:charts:deck.gl Related to deck.gl charts

Comments

@rdyatlov
Copy link

Hello!
The issue is in impossibility to change size of point circles in a deck.gl geojson chart. Although the interface allows setting the size manually with any figure, if it is less than 100, all point circles disappear.
Thus, it's only possible to build enormous circles, that sometimes hide the necessary information below them. Moreover, there are no options in interface to switch static size (meters) to a dynamic one (pixels), depending on a map scale.

image (1)
image (2)
image (3)

I've also tried to set the size manually by editing a geojson itself. I used the folowing options in "properties" dict to fit it, but didn't succeed.

[geojson building in PostGIS]...

'properties', jsonb_build_object(
        'guid', guid,
        'strokeColor', '#0000FF',
        
        'pointRadius', 30,
        'getRadius', 30,
        'radius', 30,
        'getPointRadius', 30,
        'size', 30,
        'getSize', 30,
        'marker-size', 30,
        'radiusPixels', 30,
        'getRadiusPixels', 30,
        'point_size', 30,
        'circle-radius', 30,
        'point_size_pixels', 30,
        'getPointSize', 30,
        'pointRadiusUnits', 'pixels',
        'radiusUnits', 'pixels'
    )

So, there are two questions:

  1. Is it possible to set the correct size now (any in (0;100) pixels, dynamically scaling with map)?
  2. Is it possible to modify interface menu for deck.gl geojson charts to allow user setting proper radii directly there?

Thank you!

P.S.: Superset version: 3.1.2; also tried in 4.1.1 with the same result.

Copy link

dosubot bot commented Nov 27, 2024

Hello, @rdyatlov! I'm here to assist you with any bugs, questions, or contributions you have. Let's tackle this issue together!

  1. In Superset, the default units for circle size in deck.gl geojson charts are in "square meters" and can be configured using the point_unit control. However, there is no direct setting in the interface to switch from static size (meters) to dynamic size (pixels) based on map scale. The min_radius and max_radius settings ensure that the circle respects minimum and maximum radius sizes in pixels as the zoom level changes, but these are not directly configurable through the interface for dynamic scaling [1].

  2. Currently, there is no built-in configuration or setting in the Superset interface that allows users to set point circle sizes directly in pixels, bypassing the default unit settings. The interface does not provide an option to dynamically scale circle sizes with the map. Adjustments to the interface to allow setting radii directly would require changes to the codebase, potentially involving modifications to the control panel configuration for the deck.gl geojson charts [1].

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot added the viz:charts:deck.gl Related to deck.gl charts label Nov 27, 2024
@rdyatlov
Copy link
Author

@dosu,
I'va added options you proposed to "properties", but it also didn't help:

  {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          85.151252,
          52.509425
        ]
      },
      "properties": {
        "color": [
          0,
          255,
          0,
          255
        ],
        "max_radius": 50,
        "min_radius": 5,
        "point_unit": "pixels",
      }

Hello, @rdyatlov! I'm here to assist you with any bugs, questions, or contributions you have. Let's tackle this issue together!

  1. In Superset, the default units for circle size in deck.gl geojson charts are in "square meters" and can be configured using the point_unit control. However, there is no direct setting in the interface to switch from static size (meters) to dynamic size (pixels) based on map scale. The min_radius and max_radius settings ensure that the circle respects minimum and maximum radius sizes in pixels as the zoom level changes, but these are not directly configurable through the interface for dynamic scaling [1].
  2. Currently, there is no built-in configuration or setting in the Superset interface that allows users to set point circle sizes directly in pixels, bypassing the default unit settings. The interface does not provide an option to dynamically scale circle sizes with the map. Adjustments to the interface to allow setting radii directly would require changes to the codebase, potentially involving modifications to the control panel configuration for the deck.gl geojson charts [1].

To continue talking to Dosu, mention @dosu.

Copy link

dosubot bot commented Nov 27, 2024

The point_unit property you added as "pixels" is not a recognized unit in the Superset codebase for deck.gl geojson charts. The valid units for point_unit are square_m, square_km, square_miles, radius_m, radius_km, and radius_miles [1][2].

To achieve dynamic scaling of circle sizes in pixels, you would need to modify the Superset codebase. This involves implementing a feature that allows point sizes to be specified in pixels and dynamically scale with the map. Currently, this functionality is not available out of the box in Superset.

To continue talking to Dosu, mention @dosu.

@rdyatlov
Copy link
Author

@dosu,
Also didn't help.
Can it be set by developing a custom plugin-chart?

Thank you!

The point_unit property you added as "pixels" is not a recognized unit in the Superset codebase for deck.gl geojson charts. The valid units for point_unit are square_m, square_km, square_miles, radius_m, radius_km, and radius_miles [1][2].

To achieve dynamic scaling of circle sizes in pixels, you would need to modify the Superset codebase. This involves implementing a feature that allows point sizes to be specified in pixels and dynamically scale with the map. Currently, this functionality is not available out of the box in Superset.

To continue talking to Dosu, mention @dosu.

Copy link

dosubot bot commented Nov 27, 2024

Yes, it is possible to achieve dynamic scaling of circle sizes in pixels by developing a custom plugin-chart for Superset. You can create a custom plugin that dynamically adjusts circle sizes based on the map scale. This involves implementing a custom chart component where you can control the rendering logic, such as dynamically calculating circle sizes in pixels. The ScatterPlotGlowOverlay in Superset demonstrates how circle sizes can be dynamically scaled, which you can adapt for your custom plugin [1].

To continue talking to Dosu, mention @dosu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
viz:charts:deck.gl Related to deck.gl charts
Projects
None yet
Development

No branches or pull requests

1 participant