Skip to content

Commit 94733a7

Browse files
Improve AI vision prompt for accurate chart recognition and data extraction
Enhanced the AI vision analysis to better recognize chart types, extract precise data values, and match visual styling: Chart Type Recognition: - Added comprehensive list of all supported chart types (pie, line, bar, column, area, scatter, bubble, geo, gauge, candlestick, timeline, combo, radar, polarArea) - Improved COMBO chart detection with explicit instructions to identify mixed visualization types (columns + lines) - Added chart type mapping for all Visualizer-supported types in parser Data Accuracy Improvements: - Instructed AI to interpolate values between gridlines instead of rounding - Added guidance to study Y-axis scale and gridline intervals carefully - Emphasized 5-10% accuracy requirement for data values - Provided examples of correct interpolation (e.g., 60% between 10-20 = 16) Visual Styling Detection: - Enhanced legend position detection (right/left/top/bottom) - Improved color extraction in exact order with hex codes - Added chart-type-specific styling instructions (pie slice text, 3D detection, donut detection) - Included styling examples for pie, bar/column, line/area, combo, bubble, geo, gauge, and scatter charts Combo Chart Support: - Added explicit combo chart detection rules - Instructed AI to use "seriesType" and "series" object for mixed types - Provided CSV and styling examples for combo charts - Added combo chart-specific analysis instructions Context and Safety: - Added professional context to prevent OpenAI safety filter rejections - Clarified this is for legitimate data extraction and visualization purposes - Maintained concise prompt while preserving all essential instructions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 9d67c67 commit 94733a7

1 file changed

Lines changed: 574 additions & 72 deletions

File tree

  • classes/Visualizer/Module

0 commit comments

Comments
 (0)