ShadePlot Render charts to PNG files using WebGPU and Deno.
Light — Simple Dark — Simple
Light — Title + Legend Dark — Title + Legend
Deno (v2.5.0 or higher recommended)WebGPU Compatible Hardware (GPU with WebGPU support)Git (for cloning the repository)# Clone the repository
git clone https://github.com/NeaByteLab/ShadePlot.git
# Enter the project directorycd ShadePlot/import shadeplot from '@neabyte/shadeplot' await shadeplot ( { canvas : { width : 1280 , height : 720 , style : 'dark' } , layout : { title : 'Monthly Performance' , showLegend : true , legendPosition : 'top-right' } , series : [ { label : 'Revenue' , data : [ { x : 1 , y : 42 } , { x : 2 , y : 58 } , { x : 3 , y : 71 } ] , color : '#3b82f6' , line : { width : 2 , dash : 'solid' } , marker : { show : true , size : 5 } } , { label : 'Expenses' , data : [ { x : 1 , y : 80 } , { x : 2 , y : 85 } , { x : 3 , y : 92 } ] , color : '#f43f5e' , line : { width : 2 , dash : 'dash' } , marker : { show : true , size : 5 } } ] , output : './chart.png' } ) shadeplot ( options : ShadePlotOptions ) : Promise < void > Returns: Promise<void> — resolves when the PNG file is written. Throws: Error if canvas dimensions are <= 0 or any series data is empty. Field Type Required Description canvasCanvas✓ Canvas size and color theme layoutLayoutTitle and legend configuration seriesSeries[]✓ One or more data series to render outputstring✓ Output PNG file path
Field Type Required Description widthnumber✓ Canvas width in pixels heightnumber✓ Canvas height in pixels style'dark' | 'light'✓ Color theme
Field Type Default Description titlestringChart title, centered in header showLegendbooleanfalseShow legend in header legendPosition'top-left' | 'top-right''top-left'Horizontal legend alignment
Field Type Required Description labelstring✓ Series name shown in legend dataArray<{ x: number; y: number }>✓ Data points to plot colorstring✓ Hex color string (e.g. #3b82f6) lineLineOptionsLine style options markerMarkerOptionsMarker style options
Field Type Default Description widthnumber2Line width in pixels dash'solid' | 'dash' | 'dot''solid'Line dash style
Field Type Default Description showbooleanfalseShow circle marker at each point sizenumber4Marker diameter in pixels
This project is licensed under the MIT license. See the LICENSE file for more info.