A sidebar tool for Google Sheets that allows you to visually design and insert complex SPARKLINE functions with real-time data previews.
- Persistent Sidebar: Stays open while you navigate between different sheets.
- Live Data Preview: Automatically fetches your actual sheet data to visualize the chart before you insert it.
- Full Customization: Supports all four sparkline types: Line, Bar, Column, and Winloss.
- Advanced Bar Charts: Support for up to 9 distinct color segments (
color1throughcolor9). - Collapsible Sections: Clean interface with toggleable menus for Axes, Scaling, and Styling.
- Mode-less Interaction: Click and select ranges in the sheet and hit "Get" to pull cell references instantly.
- Open Google Sheets: Open the spreadsheet where you want to use the tool.
- Open Apps Script: Go to
Extensions>Apps Script. - Create Files:
- Paste the provided backend code.
- Click the + icon, select HTML, name it
sidebar, and paste the provided UI code.
- Save & Authorize: Click the Save icon (floppy disk). Select the
onOpenfunction and click Run to authorize the script permissions. - Refresh: Refresh your Google Sheet. You will see a new menu: 📊 Sparkline Tools.
- Click 📊 Sparkline Tools > Open Sparkline Helper.
- Select Data: Highlight a range of numbers in your sheet and click the Get button next to Data Range.
- Choose Output: Click the cell where you want the chart to appear and click Get next to Target Cell.
- Customize:
- Toggle between chart types.
- Expand sections like Line Styling or Bar Colors to change hex colors.
- The Visual Preview box will update in real-time based on your actual data.
- Insert: Click the Insert button. The sidebar will insert the formula and close automatically.
- Backend: Google Apps Script (.gs)
- Frontend: HTML5, Tailwind CSS, JavaScript (Vanilla)
- Preview Engine: HTML5 Canvas API
This project is compatible with Clasp. To develop locally:
- Install Clasp:
npm install -g @google/clasp - Clone the project:
clasp clone "YOUR_SCRIPT_ID" - Push changes:
clasp push
