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

Add possibility to change price axis text color #1114

Closed
kirchet opened this issue Jul 12, 2022 · 0 comments · Fixed by #1116
Closed

Add possibility to change price axis text color #1114

kirchet opened this issue Jul 12, 2022 · 0 comments · Fixed by #1116
Milestone

Comments

@kirchet
Copy link
Contributor

kirchet commented Jul 12, 2022

Is your feature request related to a problem? Please describe.

For now we have ability to choose color for all scales:

Describe the solution you'd like

We can add an additional option like textColor in PriceScaleOptions. So the library should use this color to paint text on a scale if this color is provided via options.

export interface PriceScaleOptions {
/**
* Autoscaling is a feature that automatically adjusts a price scale to fit the visible range of data.
* Note that overlay price scales are always auto-scaled.
*
* @defaultValue `true`
*/
autoScale: boolean;
/**
* Price scale mode.
*
* @defaultValue {@link PriceScaleMode.Normal}
*/
mode: PriceScaleMode;
/**
* Invert the price scale, so that a upwards trend is shown as a downwards trend and vice versa.
* Affects both the price scale and the data on the chart.
*
* @defaultValue `false`
*/
invertScale: boolean;
/**
* Align price scale labels to prevent them from overlapping.
*
* @defaultValue `true`
*/
alignLabels: boolean;
/**
* Price scale margins.
*
* @defaultValue `{ bottom: 0.1, top: 0.2 }`
* @example
* ```js
* chart.priceScale('right').applyOptions({
* scaleMargins: {
* top: 0.8,
* bottom: 0,
* },
* });
* ```
*/
scaleMargins: PriceScaleMargins;
/**
* Set true to draw a border between the price scale and the chart area.
*
* @defaultValue `true`
*/
borderVisible: boolean;
/**
* Price scale border color.
*
* @defaultValue `'#2B2B43'`
*/
borderColor: string;
/**
* Show top and bottom corner labels only if entire text is visible.
*
* @defaultValue `false`
*/
entireTextOnly: boolean;
/**
* Indicates if this price scale visible. Ignored by overlay price scales.
*
* @defaultValue `true` for the right price scale and `false` for the left
*/
visible: boolean;
/**
* Draw small horizontal line on price axis labels.
*
* @defaultValue `false`
*/
ticksVisible: boolean;
}

Additional context

@kirchet kirchet added this to the 4.0 milestone Jul 12, 2022
@kirchet kirchet changed the title Add possibility to change price axis color Add possibility to change price axis text color Jul 13, 2022
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 a pull request may close this issue.

1 participant