Skip to content

CDD-3295: Dual Category Chart Interface#3222

Closed
tushortz wants to merge 5 commits into
mainfrom
feature/CDD-3295-dual-category-chart-interface
Closed

CDD-3295: Dual Category Chart Interface#3222
tushortz wants to merge 5 commits into
mainfrom
feature/CDD-3295-dual-category-chart-interface

Conversation

@tushortz

@tushortz tushortz commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Description

This PR includes the following:

  • dual category chart interface generation and preview
  • Segment labels used in the charts legend
  • Legend positioned at the top of the chart (see single category charts)
  • Background colour removed from the charts
  • y-axis min and max values implemented
  • Chart titles x and y axis implemented.

Fixes #CDD-3295


Type of change

Please select the options that are relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Tech debt item (this is focused solely on addressing any relevant technical debt)

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests at the right levels to prove my change is effective
  • I have added screenshots or screen grabs where appropriate
  • I have added docstrings in the correct style (google)

@tushortz tushortz requested a review from a team as a code owner June 1, 2026 12:55
Comment thread metrics/domain/charts/stacked_bar/generation.py
Comment thread metrics/api/serializers/charts/dual_category_charts.py Outdated
Comment thread metrics/api/views/charts/subplot_charts/api_view.py
@tushortz tushortz force-pushed the feature/CDD-3295-dual-category-chart-interface branch from 7ed7e1d to 51b852a Compare June 5, 2026 12:16
@tushortz

tushortz commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

Payload used

{
  "file_format": "svg",
  "chart_height": 640,
  "chart_width": 1280,
  "x_axis": "date",
  "y_axis": "metric",
  "x_axis_title": "Dates",
  "y_axis_title": "Cases",
  "y_axis_minimum_value": 0,
  "y_axis_maximum_value": null,
  "chart_type": "stacked_bar",
  "secondary_category": "stratum",
  "legend_title": "Meningococal disease cases by week",
  "static_fields": {
    "topic": "Meningococcal-disease",
    "metric": "meningococcal-disease_cases_casesByWeek",
    "stratum": "default",
    "age": "all",
    "geography": "England",
    "geography_type": "Nation",
    "sex": "all",
    "date_from": "2023-01-01",
    "date_to": "2026-06-30"
  },
  "segments": [
    {
      "secondary_field_value": "Confirmed",
      "colour": "COLOUR_1_DARK_BLUE",
      "label": ""
    },
    {
      "secondary_field_value": "Probable",
      "colour": "COLOUR_3_DARK_PINK",
      "label": ""
    }
  ]
}

@tushortz

tushortz commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author
image

Comment thread metrics/api/serializers/charts/dual_category_charts.py
Comment thread metrics/api/serializers/charts/single_category_charts.py
Comment thread metrics/interfaces/charts/single_category_charts/access.py
@tushortz tushortz force-pushed the feature/CDD-3295-dual-category-chart-interface branch from c5458b6 to 89d9497 Compare June 5, 2026 12:59
@aidan aidan force-pushed the feature/CDD-3295-dual-category-chart-interface branch from ce3ae71 to 3dca217 Compare June 11, 2026 12:57
sahmed06 and others added 3 commits June 18, 2026 11:13
Bumps [virtualenv](https://github.com/pypa/virtualenv) from 21.4.2 to 21.5.0.
- [Release notes](https://github.com/pypa/virtualenv/releases)
- [Changelog](https://github.com/pypa/virtualenv/blob/main/docs/changelog.rst)
- [Commits](pypa/virtualenv@21.4.2...21.5.0)

---
updated-dependencies:
- dependency-name: virtualenv
  dependency-version: 21.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@tushortz

Copy link
Copy Markdown
Contributor Author

all changes are now on CDD-3342's MR - #3250

@tushortz tushortz closed this Jun 22, 2026
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
4.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

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.

4 participants