Skip to content

Conversation

ghiscoding
Copy link
Owner

@ghiscoding ghiscoding commented Oct 22, 2025

image

Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

codecov bot commented Oct 22, 2025

Codecov Report

❌ Patch coverage is 99.53488% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 100.0%. Comparing base (32afcaa) to head (952dd09).

Files with missing lines Patch % Lines
...s/excel-builder-vanilla/src/Excel/Drawing/Chart.ts 99.5% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             main     #146     +/-   ##
=========================================
+ Coverage   100.0%   100.0%   +0.1%     
=========================================
  Files          24       25      +1     
  Lines        1132     1342    +210     
  Branches       93      112     +19     
=========================================
+ Hits         1131     1341    +210     
  Misses          1        1             

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

// ---------------------------
// Chart related interfaces
// ---------------------------
export type ChartType = 'bar' | 'line' | 'pie' | 'scatter';
Copy link
Owner Author

@ghiscoding ghiscoding Oct 22, 2025

Choose a reason for hiding this comment

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

by looking at w3school most popular Excel Charts, we should rename bar to column (bottom-top) and then add bar as a left-right chart. Also might be a good idea to add stacked charts for both bar/column charts.

https://www.w3schools.com/excel/excel_charts.php

series?: ChartSeriesRef[];
/** Legacy single-series fallback: categories literal */
categories?: string[];
/** Legacy single-series fallback: values literal */
Copy link
Owner Author

@ghiscoding ghiscoding Oct 22, 2025

Choose a reason for hiding this comment

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

why legacy? is that for legacy Excel file? I might need explanation and possibly (probably) just drop any legacy stuff. Would that simplify code to drop any legacy thing?

/** Hex ARGB or RGB color (e.g. FF0000 or FF0000FF) - currently cosmetic placeholder */
color?: string;
/** For scatter charts: X axis values range */
xValuesRange?: string;
Copy link
Owner Author

Choose a reason for hiding this comment

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

why do we have xValuesRange and not a yValuesRange? it seems that the valuesRange is the y and so why?

/** Category axis title (ignored for pie) */
xAxisTitle?: string;
/** Value axis title (ignored for pie) */
yAxisTitle?: string;
Copy link
Owner Author

@ghiscoding ghiscoding Oct 22, 2025

Choose a reason for hiding this comment

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

instead of having 2 separate props, could we merge them and use something like interface AxisOptions { title?: string; minimum?: number; maximum?: number'; showGridLines?: boolean } axis: { x?: AxisOptions; y?: AxisOptions; }? This is probably better for extensibility since for a 3D, then we would also have a z title.

we should do something similar for legend

see https://learn.microsoft.com/en-us/office/dev/add-ins/excel/excel-add-ins-charts

/** Height in EMUs */
height?: number;
/** Worksheet name containing referenced ranges */
sheetName?: string;
Copy link
Owner Author

Choose a reason for hiding this comment

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

is this sheetName necessary? what does that do for Charts?

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.

1 participant