Adds Chart plugin#94
Open
BhattaraiSijan wants to merge 8 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Adds the Chart plugin — receiver-only consumer of
plugin:aoi:analysisReady. Renders the AOI plugin's per-layer statistics payload as cards with a histogram and stat grid. No fetching, no per-layer config; purely a display surface for what AOI publishes.Proposed Changes
src/essence/Tools/Chart/— new pluginChartTool.js— MMGIS wrapper. Module-level subscription toplugin:aoi:analysisReady(so the event reaches Chart even when AOI is the active tool), stashes the latest payload, auto-opens the Chart panel viatoolButtonChart, mounts React.ChartComponent.tsx— presentational panel. Header + one card per(layer, asset):chartHelpers.ts— pure helpersChartComponent.cssBus surface
plugin:aoi:analysisReady { analysisData: { [layerName]: <stats | null> } }Issues
Testing
Manually tested on a DeckGL mission with two analysis-supported layers:
/statisticsPOST returns non-2xx (or its entry isnullin the payload) → the layer's card shows "Could not fetch statistics for this"; other layers still rendervalid_pixels === 0→ card shows "No usable pixels in this area"Known follow-ups (not blocking)
analysisDatapayload is keyed bylayer.name, which MMGIS internally rewrites to the UUID). Fix isdisplay_name || nameon the emit, to land on a future AOI iteration.setIntervalretry whilewindow.mmgisAPIfinishes binding — should becomemmgisAPI.whenReady()once the bus exposes a ready contract.