Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AG-14243 Move base theme params shared with grid to separate type #3659

Merged
merged 1 commit into from
Feb 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 37 additions & 34 deletions packages/ag-charts-types/src/chart/themeOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,55 @@ export interface AgChartThemePalette {
neutral?: AgPaletteColors;
}

export interface AgChartThemeParams {
interface AgBaseChartThemeParams {
/**
* The 'brand colour' for the chart, used wherever a non-neutral colour is required. Selections, focus outlines and
* checkboxes use the accent colour by default.
*/
accentColor?: CssColor;
/** Default colour for axis lines and ticks. */
axisColor?: CssColor;
/**
* Background colour of the chart. Most text, borders and backgrounds are defined as a blend between the background
* and foreground colors.
*/
backgroundColor?: CssColor;
/** Default colour for borders. */
borderColor?: CssColor;
/**
* Default colour for neutral UI elements. Most text, borders and backgrounds are defined as a blend between the
* background and foreground colors.
*/
foregroundColor?: CssColor;
/** Default font size used for all text. Titles and some other text are scaled to this font size. */
fontSize?: FontSize;
/**
* Background colour for text inputs.
*
* Default: `backgroundColor`
*/
inputBackgroundColor?: CssColor;
/**
* Colour of text within text inputs.
*
* Default: `textColor`
*/
inputTextColor?: CssColor;
/**
* Colour of text that should stand out less than the default.
*
* Default: `foregroundColor + backgroundColor`
*/
subtleTextColor?: CssColor;
/**
* Default colour for all text.
*
* Default: `foregroundColor`
*/
textColor?: CssColor;
}

export interface AgChartThemeParams extends AgBaseChartThemeParams {
/** Default colour for axis lines and ticks. */
axisColor?: CssColor;
/**
* Background colour of tooltips, menus, dialogs, toolbars and buttons.
*
Expand Down Expand Up @@ -142,45 +176,14 @@ export interface AgChartThemeParams {
* Default: `backgroundColor`
*/
crosshairLabelTextColor?: CssColor;
/**
* Default colour for neutral UI elements. Most text, borders and backgrounds are defined as a blend between the
* background and foreground colors.
*/
foregroundColor?: CssColor;
/** Font family used for all text. */
fontFamily?: FontFamily;
/** Default font size used for all text. Titles and some other text are scaled to this font size. */
fontSize?: FontSize;
/** Default font weight used for all text. */
fontWeight?: FontWeight;
/** Default colour for grid lines. */
gridLineColor?: CssColor;
/**
* Background colour for text inputs.
*
* Default: `backgroundColor`
*/
inputBackgroundColor?: CssColor;
/**
* Colour of text within text inputs.
*
* Default: `textColor`
*/
inputTextColor?: CssColor;
/** The outer chart padding. */
padding?: PixelSize;
/**
* Colour of text that should stand out less than the default.
*
* Default: `foregroundColor + backgroundColor`
*/
subtleTextColor?: CssColor;
/**
* Default colour for all text.
*
* Default: `foregroundColor`
*/
textColor?: CssColor;
}

/**
Expand Down