Skip to content

Commit fbd2d6c

Browse files
committed
add plugins to the demo chart + weak size
1 parent 52237e4 commit fbd2d6c

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

docs/demos/full.html

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,6 @@
113113
height: 6,
114114
start: 50,
115115
end: 100,
116-
117-
zoomLock: false,
118-
moveOnMouseMove: true,
119-
// This prevents the grab cursor
120-
preventDefaultMouseMove: false,
121116
},
122117
layout: {
123118
mainPaneHeight: '60%',

docs/js/chart.js

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,13 @@ console.log('Getting indicator data...');
2525
const chartContainer = document.getElementById('main-chart');
2626
window.chart = new QFChart.QFChart(chartContainer, {
2727
title: 'BTC/USDT', // Custom title
28-
height: '700px',
29-
padding: 0.2,
28+
height: '600px',
29+
padding: 0.1,
3030
databox: {
3131
position: 'floating',
3232
},
3333
dataZoom: {
34-
visible: true,
35-
position: 'top',
36-
height: 6,
37-
start: 50,
38-
end: 100,
39-
40-
zoomLock: false,
41-
moveOnMouseMove: true,
42-
// This prevents the grab cursor
43-
preventDefaultMouseMove: false,
34+
visible: false,
4435
},
4536
layout: {
4637
mainPaneHeight: '60%',
@@ -59,4 +50,17 @@ console.log('Getting indicator data...');
5950
titleColor: '#ff9900',
6051
controls: { collapse: true, maximize: true },
6152
});
53+
54+
//add plugins
55+
// Register Measure Tool Plugin
56+
const measureTool = new QFChart.MeasureTool();
57+
chart.registerPlugin(measureTool);
58+
59+
// Register Line Tool Plugin
60+
const lineTool = new QFChart.LineTool();
61+
chart.registerPlugin(lineTool);
62+
63+
// Register Fibonacci Tool Plugin
64+
const fibTool = new QFChart.FibonacciTool();
65+
chart.registerPlugin(fibTool);
6266
})();

0 commit comments

Comments
 (0)