Skip to content

feat(sales-dashboard-sample): WC-accurate pivot dashboard#21

Open
Zneeky wants to merge 7 commits into
aahmedov/fleet-managment-sample-blazorfrom
aahmedov/sales-dashboard-sample-blazor
Open

feat(sales-dashboard-sample): WC-accurate pivot dashboard#21
Zneeky wants to merge 7 commits into
aahmedov/fleet-managment-sample-blazorfrom
aahmedov/sales-dashboard-sample-blazor

Conversation

@Zneeky

@Zneeky Zneeky commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Sales Dashboard (pivot grid)

A faithful Blazor port of the Web Components sales dashboard.

Pivot

  • Columns: Country > Brand  ·  Rows: Date (Year > Quarter)  ·  Values: SUM(Sales), SUM(Profit)
  • Views: "Brands: HM and HM Home" (default), "Brands: HM + HM Home", "Stores: Bulgaria" - switchable via the toolbar dropdown
  • Built-in IsLoading indicator (the WC loading widget)

Data

  • SalesDataService fetches sales.json and maps every record into PivotSalesDataItem (no hand-written data)
  • Bundled a 10% sample (~1 MB, every 10th record) under the sample's wwwroot for a fast, offline load; the deserialized list is cached per session
  • Values are therefore ~10% of the real totals (e.g. $191K vs $1.9M); change LoadAsync()'s sample rate for the full set

Theme & toolbar

  • Scoped the Indigo grid theme to #sales-section so the grid structure (filter chips, cells) is Indigo, not just the color tokens
  • Toolbar: filled-Indigo view dropdown (white text, eye + caret icons) + outlined gray Export-to-Excel pill (download icon); SVG icons registered at runtime
  • Data-selector polish (search input size, bolder section headers) applied via a shadow-piercing interop helper

Notes

  • The native pivot dimension Filter did not take effect in this build, so the Brand/Country narrowing is done in C# on the data - same visible result
  • Export-to-Excel is a no-op, mirroring the WC sample (export not yet wired there)

Zneeky added 7 commits June 10, 2026 10:37
… and Indigo theme

- Convert the Sales sample to an IgbPivotGrid analytics dashboard matching the IgniteUI
  Web Components sales example: the sales.json dataset summarized as a cross-tab.
- Two switchable pivot presets (by Country & Brand, by Store) plus an IgbPivotDataSelector
  panel for runtime drag-and-drop reconfiguration of rows, columns, values and filters.
- Values aggregate Sales and the pre-computed Profit (Sale - Cost) with SUM and a
  SUM/AVG/COUNT/MIN/MAX dropdown; a date dimension groups periods into years and quarters.
- Apply the Indigo / Light theme scoped to the sales section (palette tokens overriding the
  host material theme - the same scoping pattern used for the fleet sample's dark theme).
- Expose Profit on the model so the grid can aggregate it; drop the live-update timer
  (too heavy for a pivot over the full dataset). Remove unused RCL boilerplate and suppress
  the unavoidable BL0005 from the documented pivot-configuration pattern.
…y 10% data sample

- Rework the layout to match the IgniteUI Web Components sales sample: a bordered toolbar with
  the header-surface background and bordered, gap-less pivot + data-selector containers.
- Temporarily sample every 10th record (~10%) so the pivot loads quickly while validating
  functionality; marked for removal before finalizing.

WIP: parked to revisit last (indigo grid-structure theme and data-loading strategy still open).
…d data, Indigo theme, styled toolbar

- Map every sales.json record into PivotSalesDataItem via SalesDataService (no hand-written data);
  bundle a 10% sample (~1MB, every 10th record) locally and cache the deserialized list per session.
- Configure the pivot 1:1 with the WC sample: Country > Brand columns, Date (Year > Quarter) rows,
  Sales + Profit values, narrowed to the HM / HM Home brands in C# (the native dimension Filter does
  not apply in this build). Three switchable views: Brands separate / combined, Stores: Bulgaria.
- Scope the Indigo grid theme to #sales-section so the grid structure (filter chips, cells) is Indigo,
  not just the color tokens.
- Toolbar: replace the select with a filled-Indigo IgbDropdown button (white text, eye + caret icons)
  and an outlined gray Export-to-Excel pill (download icon); SVG icons registered at runtime.
- Use the pivot grid built-in IsLoading indicator (the WC loading widget).
- Shrink the data selector search input and enlarge/bolden its section headers via a shadow-piercing
  interop helper (they render inside the selector shadow root).
…blazor' into aahmedov/sales-dashboard-sample-blazor
…blazor' into aahmedov/sales-dashboard-sample-blazor

# Conflicts:
#	BlazorGridExamples/wwwroot/scripts/shell-interop.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant