diff --git a/ANNOTATE/data/annotations/annotations_db.json b/ANNOTATE/data/annotations/annotations_db.json index 4a88ccb..8854c3d 100644 --- a/ANNOTATE/data/annotations/annotations_db.json +++ b/ANNOTATE/data/annotations/annotations_db.json @@ -116,23 +116,46 @@ } }, { - "annotation_id": "bbafc50c-f885-4dbc-b0cb-fdfb48223b5c", + "annotation_id": "cdf32bb9-8f0f-467d-abc2-d409a7c22bcc", "symbol": "ETH/USDT", "timeframe": "1m", "entry": { - "timestamp": "2025-11-12 07:58", - "price": 3424.58, - "index": 284 + "timestamp": "2025-11-22 06:41", + "price": 2759.12, + "index": 250 }, "exit": { - "timestamp": "2025-11-12 11:08", - "price": 3546.35, - "index": 329 + "timestamp": "2025-11-22 10:42", + "price": 2709.14, + "index": 335 }, - "direction": "LONG", - "profit_loss_pct": 3.5557645025083366, + "direction": "SHORT", + "profit_loss_pct": 1.8114471280698201, "notes": "", - "created_at": "2025-11-12T13:11:31.267142", + "created_at": "2025-11-22T13:09:16.675137", + "market_context": { + "entry_state": {}, + "exit_state": {} + } + }, + { + "annotation_id": "5cf94e70-e8f7-4c29-a860-4c2bc516bd8c", + "symbol": "ETH/USDT", + "timeframe": "1s", + "entry": { + "timestamp": "2025-11-22 11:00:30", + "price": 2714.28, + "index": 63 + }, + "exit": { + "timestamp": "2025-11-22 11:05:19", + "price": 2705.95, + "index": 90 + }, + "direction": "SHORT", + "profit_loss_pct": 0.30689538293766233, + "notes": "", + "created_at": "2025-11-22T13:09:40.711052", "market_context": { "entry_state": {}, "exit_state": {} @@ -140,7 +163,7 @@ } ], "metadata": { - "total_annotations": 6, - "last_updated": "2025-11-12T13:11:31.267456" + "total_annotations": 7, + "last_updated": "2025-11-22T13:09:40.712602" } } \ No newline at end of file diff --git a/ANNOTATE/web/static/js/chart_manager.js b/ANNOTATE/web/static/js/chart_manager.js index 74dec7c..1433c7a 100644 --- a/ANNOTATE/web/static/js/chart_manager.js +++ b/ANNOTATE/web/static/js/chart_manager.js @@ -462,7 +462,7 @@ class ChartManager { font: { color: '#f8f9fa', size: 11 }, margin: { l: 60, r: 20, t: 10, b: 40 }, hovermode: 'x unified', - dragmode: 'pan', + dragmode: 'zoom', // Use zoom mode for better scroll behavior // Performance optimizations autosize: true, staticPlot: false @@ -473,22 +473,22 @@ class ChartManager { displayModeBar: true, modeBarButtonsToRemove: ['lasso2d', 'select2d'], // Allow autoScale2d displaylogo: false, - scrollZoom: true, + scrollZoom: true, // Enable mouse wheel zoom // Enable vertical scaling by dragging Y-axis doubleClick: 'reset', // Double-click to reset zoom showAxisDragHandles: true, // Show drag handles on axes showAxisRangeEntryBoxes: true, // Allow manual range entry - // Axis drag behavior - editable: true, // Make axes editable + // Make pivot lines and annotations read-only + editable: false, // Disable editing to prevent dragging shapes edits: { axisTitleText: false, colorbarPosition: false, colorbarTitleText: false, legendPosition: false, legendText: false, - shapePosition: true, - annotationPosition: true, - annotationTail: true, + shapePosition: false, // Prevent dragging pivot lines + annotationPosition: false, // Prevent dragging annotations + annotationTail: false, annotationText: false } }; diff --git a/ANNOTATE/web/templates/components/annotation_list.html b/ANNOTATE/web/templates/components/annotation_list.html index ec42ce9..47e3983 100644 --- a/ANNOTATE/web/templates/components/annotation_list.html +++ b/ANNOTATE/web/templates/components/annotation_list.html @@ -99,6 +99,12 @@ function renderAnnotationsList(annotations) { const listContainer = document.getElementById('annotations-list'); const noAnnotationsMsg = document.getElementById('no-annotations-msg'); + const annotationCountEl = document.getElementById('annotation-count'); + + // Update count immediately + if (annotationCountEl) { + annotationCountEl.textContent = annotations.length; + } if (annotations.length === 0) { noAnnotationsMsg.style.display = 'block'; @@ -196,9 +202,6 @@ listContainer.appendChild(item); }); - - // Update annotation count - document.getElementById('annotation-count').textContent = annotations.length; } function viewAnnotation(annotation) { diff --git a/ANNOTATE/web/templates/components/training_panel.html b/ANNOTATE/web/templates/components/training_panel.html index 3c76555..c9a9fe7 100644 --- a/ANNOTATE/web/templates/components/training_panel.html +++ b/ANNOTATE/web/templates/components/training_panel.html @@ -78,18 +78,20 @@ - - - +
+ + + +