Implement working canvas-based trading chart
- Created SimpleTradingChart component using HTML5 Canvas - Renders proper candlestick chart with sample SOL/USDC data - Includes grid lines, price labels, and proper styling - Replaced problematic lightweight-charts with working solution - Updated trading page to use the new working chart component Fixes chart loading issues by using native HTML5 Canvas instead of external library dependencies.
This commit is contained in:
12
app/canvas-chart/page.tsx
Normal file
12
app/canvas-chart/page.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
'use client'
|
||||
import React from 'react'
|
||||
import SimpleTradingChart from '../../components/SimpleTradingChart'
|
||||
|
||||
export default function SimpleChartPage() {
|
||||
return (
|
||||
<div className="min-h-screen bg-gray-900 p-8">
|
||||
<h1 className="text-white text-3xl mb-6">Simple Canvas Chart Test</h1>
|
||||
<SimpleTradingChart symbol="SOL/USDC" positions={[]} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -4,7 +4,7 @@ import TradeExecutionPanel from '../../components/TradeExecutionPanel.js'
|
||||
import PositionsPanel from '../../components/PositionsPanel.js'
|
||||
import PendingOrdersPanel from '../../components/PendingOrdersPanel.js'
|
||||
import TradesHistoryPanel from '../../components/TradesHistoryPanel.js'
|
||||
import TradingChart from '../../components/TradingChart'
|
||||
import SimpleTradingChart from '../../components/SimpleTradingChart'
|
||||
|
||||
export default function TradingPage() {
|
||||
return (
|
||||
@@ -22,7 +22,7 @@ export default function TradingPage() {
|
||||
<span>1D</span>
|
||||
</div>
|
||||
</div>
|
||||
<TradingChart symbol="SOL/USDC" positions={[]} />
|
||||
<SimpleTradingChart symbol="SOL/USDC" positions={[]} />
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 xl:grid-cols-2 gap-8">
|
||||
|
||||
Reference in New Issue
Block a user