Skip to content

The legend colors do not match the Pie chart colors #1062

@ajay1685

Description

@ajay1685

Bug report

Describe the bug
When using Charts.pieChart() the colors of the chart match the colors for that class of objects. However, the colors of the legend do not match!

To Reproduce
Steps to reproduce the behavior:

  1. Run Positive cell detection on an image
  2. Use the following code to create a pie chart:
    chartData = getDetectionObjects().countBy(p -> p.getPathClass())
    Charts.pieChart()
        .title('Test Chart')
        .data(chartData)
        .show()

Expected behavior
The colors of the legend shall match the colors of the pie.

Screenshots

Desktop (please complete the following information):

  • OS: Windows 10
  • QuPath Version: Tested on v2.3 and the latest snapshot

Additional context
More details on the forum:
https://forum.image.sc/t/pie-chart-legend-colors/72051

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions