fix: Add debug logging for auto scale button
This commit is contained in:
@ -511,14 +511,21 @@ constructor() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
btnAutoScale.addEventListener('click', () => {
|
btnAutoScale.addEventListener('click', () => {
|
||||||
|
console.log('[AutoScale] Button clicked');
|
||||||
|
console.log('[AutoScale] candleSeries:', this.candleSeries);
|
||||||
|
console.log('[AutoScale] priceScale():', this.candleSeries?.priceScale());
|
||||||
|
|
||||||
this.priceScaleState.autoScale = !this.priceScaleState.autoScale;
|
this.priceScaleState.autoScale = !this.priceScaleState.autoScale;
|
||||||
btnAutoScale.classList.toggle('active', this.priceScaleState.autoScale);
|
btnAutoScale.classList.toggle('active', this.priceScaleState.autoScale);
|
||||||
|
|
||||||
|
try {
|
||||||
this.candleSeries.priceScale().applyOptions({
|
this.candleSeries.priceScale().applyOptions({
|
||||||
autoScale: this.priceScaleState.autoScale
|
autoScale: this.priceScaleState.autoScale
|
||||||
});
|
});
|
||||||
|
console.log('[AutoScale] Success:', this.priceScaleState.autoScale ? 'ON' : 'OFF');
|
||||||
console.log('Auto Scale:', this.priceScaleState.autoScale ? 'ON' : 'OFF');
|
} catch (e) {
|
||||||
|
console.error('[AutoScale] Error:', e.message);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
btnLogScale.addEventListener('click', () => {
|
btnLogScale.addEventListener('click', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user