Skip to content

feat(analytics): Enhance timeline charts and add table filtering#34245

Merged
oidacra merged 4 commits intomainfrom
33846-base-dashboard-fixes
Jan 14, 2026
Merged

feat(analytics): Enhance timeline charts and add table filtering#34245
oidacra merged 4 commits intomainfrom
33846-base-dashboard-fixes

Conversation

@oidacra
Copy link
Copy Markdown
Member

@oidacra oidacra commented Jan 8, 2026

Summary

Enhances analytics dashboard with improved timeline chart data visualization and table filtering capabilities for conversion tracking.

Changes Made

Data Visualization

  • Fixed missing data points in timeline charts (analytics-data.utils.ts)

    • Implemented generic fillMissingDates function with factory pattern
    • Added entity factories: createEmptyPageViewEntity, createEmptyConversionTrendEntity, createEmptyTrafficVsConversionsEntity
    • Zero values now display as visible green dots instead of gaps in charts
    • Applied to Conversion Trend, Traffic vs Conversions, and Page View charts
  • Updated Traffic vs Conversions chart

    • Changed from "conversion rate %" to absolute "conversions" count for clearer comparison

Table Filtering

  • Content Conversions Table (dot-analytics-content-conversions-table.component.*)
    • Added event type multi-select filter with badges
    • Added title/content text search filter
    • Implemented dynamic filter options based on actual data

Testing

  • Added 142 lines of unit tests for date gap filling logic
  • Comprehensive coverage for all entity types and edge cases

Technical Details

Refactored date gap filling to use a generic factory pattern, eliminating code duplication:

fillMissingDates<T extends TimelineEntity>(
    data: T[], timeRange: TimeRangeInput,
    granularity: Granularity, createEmptyEntity: EmptyEntityFactory<T>
): T[]

Charts now distinguish between "no data" (gaps) and "zero values" (visible points) using conditional styling.

Breaking Changes

None

Testing

  • Unit tests added (date filling, factories, entity structures)
  • Integration tests verified (store features)
  • Manual testing performed (charts, filters, UI)

Related Issues

Fixes #33846

This PR fixes: #33846

@oidacra oidacra marked this pull request as ready for review January 8, 2026 18:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the analytics dashboard with improved timeline chart data visualization and table filtering capabilities. The changes focus on fixing missing data points in charts (displaying zeros as visible dots instead of gaps) and adding comprehensive filtering functionality to the Content Conversions Table.

Changes:

  • Refactored date gap filling logic into a generic factory pattern with type-safe entity factories
  • Updated Traffic vs Conversions chart to show absolute conversion counts instead of conversion rate percentage
  • Added event type and title filtering to Content Conversions Table with styled badges
  • Updated styling for analytics components including metrics display and event type badges

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Language.properties Added search placeholder translation for table filtering
dot-analytics-dashboard-metrics.component.scss Adjusted spacing and font styling for metrics display
dot-analytics-dashboard-chart.component.ts Disabled y1 axis display for combo charts
dot-analytics-conversions-overview-table.component.ts Removed unused imports (ChipModule, TooltipModule)
dot-analytics-conversions-overview-table.component.scss Replaced chip styles with event type badge styles
dot-analytics-conversions-overview-table.component.html Changed from p-chip to p-tag for event type display
dot-analytics-content-conversions-table.component.ts Added linkedSignal for dynamic event type filter options
dot-analytics-content-conversions-table.component.scss Added filter menu and event type badge styling
dot-analytics-content-conversions-table.component.html Added p-columnFilter components for event type and title filtering
analytics-data.utils.ts Implemented generic fillMissingDates with factory pattern and entity factories
analytics-data.utils.spec.ts Added 142 lines of unit tests for date filling and factory functions
with-pageview.feature.ts Updated fillMissingDates call to include factory parameter
with-conversions.feature.ts Updated fillMissingDates calls for both conversion trend and traffic data

…d refactor chart colors and timeline entity creation.
@oidacra oidacra enabled auto-merge January 14, 2026 18:18
@oidacra oidacra added this pull request to the merge queue Jan 14, 2026
Merged via the queue into main with commit 3652bdf Jan 14, 2026
39 checks passed
@oidacra oidacra deleted the 33846-base-dashboard-fixes branch January 14, 2026 19:48
dsolistorres pushed a commit that referenced this pull request Feb 20, 2026
)

## Summary

Enhances analytics dashboard with improved timeline chart data
visualization and table filtering capabilities for conversion tracking.

  ## Changes Made

  ### Data Visualization

- **Fixed missing data points in timeline charts**
(`analytics-data.utils.ts`)
- Implemented generic `fillMissingDates` function with factory pattern
- Added entity factories: `createEmptyPageViewEntity`,
`createEmptyConversionTrendEntity`,
`createEmptyTrafficVsConversionsEntity`
- Zero values now display as visible green dots instead of gaps in
charts
- Applied to Conversion Trend, Traffic vs Conversions, and Page View
charts

  - **Updated Traffic vs Conversions chart**
- Changed from "conversion rate %" to absolute "conversions" count for
clearer comparison

  ### Table Filtering

- **Content Conversions Table**
(`dot-analytics-content-conversions-table.component.*`)
    - Added event type multi-select filter with badges
    - Added title/content text search filter
    - Implemented dynamic filter options based on actual data

  ### Testing

  - Added 142 lines of unit tests for date gap filling logic
  - Comprehensive coverage for all entity types and edge cases

  ## Technical Details

Refactored date gap filling to use a generic factory pattern,
eliminating code duplication:

  ```typescript
  fillMissingDates<T extends TimelineEntity>(
      data: T[], timeRange: TimeRangeInput,
      granularity: Granularity, createEmptyEntity: EmptyEntityFactory<T>
  ): T[]
```

  Charts now distinguish between "no data" (gaps) and "zero values" (visible points) using conditional styling.

## Breaking Changes

  None

## Testing

  - Unit tests added (date filling, factories, entity structures)
  - Integration tests verified (store features)
  - Manual testing performed (charts, filters, UI)

## Related Issues

  Fixes #33846
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Implement Conversions Dashboard for Analytics

4 participants