Skip to content

Comments

feat: add a new radar chart operator#4217

Open
PG1204 wants to merge 17 commits intoapache:mainfrom
PG1204:main
Open

feat: add a new radar chart operator#4217
PG1204 wants to merge 17 commits intoapache:mainfrom
PG1204:main

Conversation

@PG1204
Copy link

@PG1204 PG1204 commented Feb 15, 2026

What changes were proposed in this PR?

Screenshot 2026-02-14 at 4 59 43 PM

This change introduces a radar chart operator, which visualizes multivariate data by plotting multiple quantitative variables on axes that radiate from a central point.

In a radar chart:

  • Each axis represents a distinct variable or feature.
  • Data points are plotted along each axis according to their value and connected to form a polygon.
  • Multiple observations can be overlaid for comparison.
  • The resulting shape and area provide intuitive insights into the strengths, weaknesses, and patterns across variables.
  • This visualization is especially useful for comparing feature profiles, identifying outliers, and understanding the distribution of values across several dimensions in a single, compact graphic.

The operator takes as input a set of variables (features) for each observation and outputs a radar chart that enables easy visual comparison across all provided dimensions.

Any related issues, documentation, discussions?

No related issues, documentation, discussions have been linked to this feature at this time.

How was this PR tested?

A dedicated test file (TestRadarChart.scala) was created to thoroughly test the radar chart operator, covering both typical and edge cases. The tests verify correct rendering and data handling for various input scenarios. In addition, all existing test cases were run using sbt test to ensure no regressions were introduced. Manual testing was also performed in the Texera UI to visually confirm the radar chart output.

Was this PR authored or co-authored using generative AI tooling?

This PR was co-authored by Perplexity AI.

@github-actions github-actions bot added frontend Changes related to the frontend GUI common labels Feb 15, 2026
@PG1204 PG1204 marked this pull request as draft February 15, 2026 01:28
@PG1204 PG1204 marked this pull request as ready for review February 15, 2026 01:29
@PG1204
Copy link
Author

PG1204 commented Feb 15, 2026

@Ma77Ball , @chenlica - requesting your review

@chenlica chenlica self-requested a review February 15, 2026 08:12
@chenlica
Copy link
Contributor

@Ma77Ball Please review it first.

Copy link
Contributor

@Ma77Ball Ma77Ball left a comment

Choose a reason for hiding this comment

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

The code looks overall good. I left a few comments and noticed a failing test case. I would recommend running the test cases locally on your GitHub and identifying the issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please change this image to be a valid png with no background.

Comment on lines 69 to 75
@JsonProperty(value = "fillOpacity", required = true)
@JsonSchemaTitle("Fill Opacity")
@JsonPropertyDescription(
"Opacity value for radar chart fill from 0.0 (transparent) to 1.0 (opaque)"
)
@JsonSchemaInject(json = """{ "minimum": 0.0, "maximum": 1.0 }""")
var fillOpacity: Double = 0.5
Copy link
Contributor

@Ma77Ball Ma77Ball Feb 16, 2026

Choose a reason for hiding this comment

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

Make the default value show on the frontend. Also, it would be better to use 0.1 increments for opacity instead of 1.

Comment on lines 95 to 101
assert(nameColumn.nonEmpty && valueColumns != null && !valueColumns.isEmpty)
val valueColsList = valueColumns.mkString("', '")
s"""
| required_cols = ['$nameColumn', '$valueColsList']
| table.dropna(subset=required_cols, inplace=True)
| # Ensure all value columns are numeric
| value_cols = ['$valueColsList']
Copy link
Contributor

Choose a reason for hiding this comment

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

Causes an error when there is an apostrophe in the column name. I recommend substituting apostrophes in column names to \'

Image

Comment on lines 109 to 113
val valueColsList = valueColumns.mkString("', '")
s"""
| # Create radar chart
| fig = go.Figure()
| categories = ['$valueColsList']
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as valueColsList above.

Copy link
Author

Choose a reason for hiding this comment

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

I have made all the mentioned changes. when I ran 'sbt scalafixAll', a few scala files (not related to my radar chart) were changed - are these changes specific to my local environment or should I push these changes as well?

Copy link
Contributor

Choose a reason for hiding this comment

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

The changes should be specific to your local environment unless introduced from a previous pr. I recommend pushing the changes along with sbt scalafmtAll for review. (Although I'm not sure why yours would be different from the other Prs being raised)

Copy link
Author

Choose a reason for hiding this comment

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

Or should I just push my changes alone for now and leave the 'sbt scalafixAll' changes to my local?

Copy link
Contributor

Choose a reason for hiding this comment

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

I recommend pulling and merging the upstream main repo into your repo. After checking the diff between your repo and the Texera main repo to see whether those changes are already present, or if a separate PR needs to be raised to fix the issue. Also, make sure your versions of each software match the wiki.

Copy link
Contributor

Choose a reason for hiding this comment

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

I might also recommend, since not many files were changed, that you make your main match the upstream Apache/Texera repo and create a fork of the original repo with your changes. I'm not sure why your files are different.

Copy link
Author

@PG1204 PG1204 Feb 19, 2026

Choose a reason for hiding this comment

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

Yeah understood, I'll be match my main with the upstream texera repo and then update my changes

Copy link
Contributor

@Ma77Ball Ma77Ball left a comment

Choose a reason for hiding this comment

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

Accidentally submitted an approved review. Please address and respond to the comments above first.

@Ma77Ball
Copy link
Contributor

In the future, please respond to the comments and mention a little of what you did to address the issue after you can hit resolve comment at the bottom of each. This action helps with the review process.

Copy link
Author

@PG1204 PG1204 left a comment

Choose a reason for hiding this comment

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

@Ma77Ball I have made the suggested changes.

Copy link
Author

@PG1204 PG1204 left a comment

Choose a reason for hiding this comment

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

@Ma77Ball the scala lint check failed in the previous submission, I formatted the code and have resubmitted.

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

Labels

common frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants