Version: 1.0.0
Custom price scale
The CustomPriceScale module provides full control over the Y-axis appearance, including text colors, grid lines, font, and axis background.
Overview
Edit custom-pricescale.js to call window.ChartingAPI.setPriceScaleSettings(). Leave color fields empty for automatic theme-aware values.
Settings API
window.ChartingAPI.setPriceScaleSettings({
textColor: '#707584', // Label text color
lineColor: 'rgba(0,0,0,0.08)', // Grid line color
lineWidth: 0.5, // Grid line thickness
lineDash: [4, 4], // Grid dash pattern
fontSize: '10.5px', // Label font size
fontFamily: 'Inter, Arial, sans-serif',
axisBackgroundColor: '#1a1a24' // Y-axis column background
});
textColor: '#707584', // Label text color
lineColor: 'rgba(0,0,0,0.08)', // Grid line color
lineWidth: 0.5, // Grid line thickness
lineDash: [4, 4], // Grid dash pattern
fontSize: '10.5px', // Label font size
fontFamily: 'Inter, Arial, sans-serif',
axisBackgroundColor: '#1a1a24' // Y-axis column background
});
Options Reference
| Option | Type | Description |
|---|---|---|
| textColor | string | Color of price labels. Leave empty for auto theme. |
| lineColor | string | Color of horizontal grid lines. |
| lineWidth | number | Grid line thickness in pixels. |
| lineDash | number[] | Dash pattern for grid lines, e.g. [4, 4]. |
| fontSize | string | CSS font size string for price labels (e.g. '10.5px'). |
| fontFamily | string | CSS font family for price labels. |
| axisBackgroundColor | string | Y-axis column background color. |