feat: Add customizable styles for line and bar series in data browser graph#3131
feat: Add customizable styles for line and bar series in data browser graph#3131mtrezza merged 5 commits intoparse-community:alphafrom
Conversation
|
🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review. |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR adds support for secondary Y-axis chart type configuration and introduces per-dataset styling options (line and bar styles) across graph configuration components. Styling properties are translated into Chart.js-compatible attributes, and styling information is propagated through the data processing pipeline. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant GraphDialog as GraphDialog UI
participant GraphPanel as GraphPanel
participant DataUtils as GraphDataUtils
participant ChartJS as Chart.js
User->>GraphDialog: Configure chart type, secondary axis type,<br/>line/bar styles per dataset
GraphDialog->>GraphDialog: Store secondaryYAxisType,<br/>lineStyle, barStyle in state
GraphDialog->>GraphPanel: Pass graphConfig with new properties
GraphPanel->>DataUtils: Process calculated values with<br/>styling metadata
DataUtils->>DataUtils: Create styleMap entries for<br/>lineStyle/barStyle
DataUtils->>GraphPanel: Return datasets with styling props
GraphPanel->>GraphPanel: Translate lineStyle → borderDash,<br/>barStyle → fill/border patterns
GraphPanel->>GraphPanel: Apply secondaryYAxisType to y1 datasets
GraphPanel->>ChartJS: Render with styled datasets
ChartJS->>User: Display chart with secondary axis<br/>and applied line/bar styles
Estimated code review effort🎯 4 (Complex) | ⏱️ ~70 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@src/components/GraphPanel/GraphPanel.react.js`:
- Around line 159-227: The dataset styling uses global
chartType/secondaryYAxisType and can misapply styles when a dataset has its own
type; compute the dataset's effective type and base decisions on that. In the
mappings that set isLineDataset/isBarDataset (the result.datasets.map blocks
that currently use chartType and (dataset.yAxisID === 'y1' &&
secondaryYAxisType)), determine effectiveType = dataset.type || (dataset.yAxisID
=== 'y1' ? secondaryYAxisType : chartType) and then use effectiveType === 'line'
or effectiveType === 'bar' when applying borderDash/barStyle logic so
dataset.type overrides global defaults.
In `@src/dashboard/Data/Browser/GraphDialog.react.js`:
- Around line 563-600: Compute the effective series type for each series (e.g.,
const effectiveType = calc.useSecondaryYAxis ? this.state.secondaryYAxisType :
this.state.chartType) and use it to gate the style controls instead of the
current mixed conditionals; replace occurrences like (this.state.chartType ===
'line' || (calc.useSecondaryYAxis && this.state.secondaryYAxisType === 'line'))
and the similar bar check with (effectiveType === 'line') and (effectiveType ===
'bar') respectively so only the relevant Dropdown (LINE_STYLES or BAR_STYLES) is
rendered for the series in render (where calc, this.state.chartType,
this.state.secondaryYAxisType, updateCalculatedValue, LINE_STYLES and BAR_STYLES
are referenced).
# [8.3.0-alpha.14](8.3.0-alpha.13...8.3.0-alpha.14) (2026-01-20) ### Features * Add customizable styles for line and bar series in data browser graph ([#3131](#3131)) ([501dd4b](501dd4b))
|
🎉 This change has been released in version 8.3.0-alpha.14 |
New Pull Request Checklist
Summary by CodeRabbit
Release Notes
New Features
✏️ Tip: You can customize this high-level summary in your review settings.