put in the chart
Seva Luchianov
1 year, 7 months ago
10 | 10 | "axios": "^0.21.1", |
11 | 11 | "bcrypt": "^5.0.1", |
12 | 12 | "bufferutil": "^4.0.1", |
13 | "chart.js": "^4.4.0", | |
13 | 14 | "command-line-args": "^5.1.1", |
14 | 15 | "cookie-parser": "^1.4.5", |
15 | 16 | "dotenv": "^8.2.0", |
1840 | 1841 | "@jridgewell/sourcemap-codec": "^1.4.14" |
1841 | 1842 | } |
1842 | 1843 | }, |
1844 | "node_modules/@kurkle/color": { | |
1845 | "version": "0.3.2", | |
1846 | "resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.2.tgz", | |
1847 | "integrity": "sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw==" | |
1848 | }, | |
1843 | 1849 | "node_modules/@leichtgewicht/ip-codec": { |
1844 | 1850 | "version": "2.0.4", |
1845 | 1851 | "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", |
3001 | 3007 | }, |
3002 | 3008 | "engines": { |
3003 | 3009 | "node": ">=4" |
3010 | } | |
3011 | }, | |
3012 | "node_modules/chart.js": { | |
3013 | "version": "4.4.0", | |
3014 | "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.0.tgz", | |
3015 | "integrity": "sha512-vQEj6d+z0dcsKLlQvbKIMYFHd3t8W/7L2vfJIbYcfyPcRx92CsHqECpueN8qVGNlKyDcr5wBrYAYKnfu/9Q1hQ==", | |
3016 | "dependencies": { | |
3017 | "@kurkle/color": "^0.3.0" | |
3018 | }, | |
3019 | "engines": { | |
3020 | "pnpm": ">=7" | |
3004 | 3021 | } |
3005 | 3022 | }, |
3006 | 3023 | "node_modules/chokidar": { |
15 | 15 | "axios": "^0.21.1", |
16 | 16 | "bcrypt": "^5.0.1", |
17 | 17 | "bufferutil": "^4.0.1", |
18 | "chart.js": "^4.4.0", | |
18 | 19 | "command-line-args": "^5.1.1", |
19 | 20 | "cookie-parser": "^1.4.5", |
20 | 21 | "dotenv": "^8.2.0", |
0 | 0 | require('../scss/style.scss'); |
1 | 1 | require('../scss/home.scss'); |
2 | require('./utils/chart') | |
2 | 3 | const logger_commands = require('./utils/logger'); |
3 | 4 | const $ = require('jquery'); |
4 | 5 | const utils = require('./utils'); |
0 | require(['chart.js/auto'], function(Chart) { | |
1 | var ctx = document.getElementById('myChart').getContext('2d'); | |
2 | const chartData = { | |
3 | Dates:["05/08/2020", "05/09/2020", "05/10/2020"], | |
4 | Data: [1500, 1200, 1750] | |
5 | }; | |
6 | ||
7 | new Chart(ctx, { | |
8 | type: 'line', | |
9 | options:{ | |
10 | responsive: true, | |
11 | maintainAspectRatio: false, | |
12 | }, | |
13 | data: { | |
14 | labels: chartData.Dates, | |
15 | datasets: [ | |
16 | { | |
17 | label: "Order Amount", | |
18 | fill: false, | |
19 | lineTension: 0, | |
20 | borderColor: "#0d6efd", | |
21 | data: chartData.Data | |
22 | } | |
23 | ] | |
24 | } | |
25 | }); | |
26 | });⏎ |
0 | 0 | @import 'style.scss'; |
1 | ||
2 | .chart-wrapper { | |
3 | height: 30vh; | |
4 | } | |
1 | 5 | |
2 | 6 | .upload-button { |
3 | 7 | float: right; |
1 | 1 | <img class="mobile-menu-icon left" src="/images/hamburger-icon.svg"> |
2 | 2 | <img class="mobile-menu-icon right" src="/images/watchrooms-icon.svg"> |
3 | 3 | <div class="torso"> |
4 | {{> page/chart}} | |
4 | 5 | <div class="left-sidebar"> |
5 | 6 | <div class="sidebar-item selected" id="library">Library</div> |
6 | 7 | <div class="sidebar-item" id="account">Account</div> |
116 | 117 | </div> |
117 | 118 | </div> |
118 | 119 | </div> |
119 | <div class="footer"> | |
120 | <div class="copyright-text">© {{current_year}} Seva Luchianov</div> | |
121 | <div class="footer-element"> | |
122 | <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"> | |
123 | <input type="hidden" name="cmd" value="_donations" /> | |
124 | <input type="hidden" name="business" value="PRF85CF6VZ592" /> | |
125 | <input type="hidden" name="item_name" value="Support Watch Together" /> | |
126 | <input type="hidden" name="currency_code" value="USD" /> | |
127 | <input type="image" class="donate-button" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" title="PayPal - The safer, easier way to pay online!" alt="Donate with PayPal button" /> | |
128 | </form> | |
129 | </div> | |
130 | <div class="footer-element"> | |
131 | <a href="https://discord.gg/8fHMSD4aZ4"> | |
132 | <img style="width: 120px;" src="/images/discord-link.png"> | |
133 | </a> | |
134 | </div> | |
135 | </div> | |
136 | <div class="donate-info"> | |
137 | Watch Together will always be free, no exceptions.<br> | |
138 | However, it costs $20/month to keep Watch Together online.<br> | |
139 | If you love this service, please consider a donation <span style="color: #ff00ff;">♥</span> | |
140 | </div> | |
141 | <div class="right-sidebar"> | |
142 | <div class="watchrooms"> | |
143 | <div class="network-info"> | |
144 | <div class="network-info-item">Status: <span id="ws-status">Connecting...</span></div> | |
145 | <div class="network-info-item">Latency: <span id="latency">0</span>ms</div> | |
146 | <div class="network-info-item">Clock Drift: <span id="clock-drift">0</span>ms</div> | |
147 | </div> | |
148 | <div class="field-header sidebar">Active Watchrooms</div> | |
149 | <div id="watchrooms"></div> | |
150 | </div> | |
151 | <div class="messages"> | |
152 | <div class="field-header sidebar">Announcements</div> | |
153 | <div id="messages"></div> | |
154 | </div> | |
155 | </div> | |
156 | 120 | <script src="/js/home.js"></script>⏎ |
10 | 10 | {{#if captcha}} |
11 | 11 | <script src="https://www.google.com/recaptcha/api.js?render=6LfNZvsUAAAAADGihvl9M1g0ypKt_qQBOYSd8slF"></script> |
12 | 12 | {{/if}} |
13 | {{#if ads_enabled}} | |
14 | <script data-ad-client="ca-pub-8776153962782162" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> | |
15 | {{/if}} | |
16 | 13 | </head> |
17 | 14 | |
18 | 15 | <body> |