Add personal budget chartifact example with interactive sliders, charts, and textbox inputs - #82
Conversation
Co-authored-by: danmarshall <11507384+danmarshall@users.noreply.github.com>
Co-authored-by: danmarshall <11507384+danmarshall@users.noreply.github.com>
|
Copilot for some reason, it doesnt work. can you validate against the schema? |
…d pluck() functions Co-authored-by: danmarshall <11507384+danmarshall@users.noreply.github.com>
I found and fixed the issue! The problem was in the Vega expressions used for calculating Fixed in commit efdbc7e:
The example now validates correctly against the schema and uses proper Vega expression functions. All data calculations, charts, and interactive elements should work as expected. |
|
Copilot oh no i actually meant personal budget |
Co-authored-by: danmarshall <11507384+danmarshall@users.noreply.github.com>
You're absolutely right! I misunderstood and created a "persona budget" when you wanted a "personal budget". Fixed in commit 4876d53:
The example is now a straightforward personal budget planner without the persona switching feature. |
|
Copilot 404 because your link is to main branch |
You're absolutely right! The link was pointing to the main branch where the file doesn't exist yet. Here's the correct preview link using the current commit hash: This should work now since it points to the actual commit where the personal-budget.idoc.json file exists. |
|
Copilot lets remove the ${{monthlyIncome}} from labels. idk what you were thinking here. it might help for you to browse through sibling files for examples. also: |
Co-authored-by: danmarshall <11507384+danmarshall@users.noreply.github.com>
Fixed both issues in commit 01a4c93:
The example now validates correctly and should work without the Vega function errors. 🔗 Updated Preview: https://microsoft.github.io/chartifact/view/?load=https://raw.githubusercontent.com/microsoft/chartifact/01a4c93/packages/web-deploy/json/personal-budget.idoc.json |
|
Copilot 🤩 wow looks great! lets make a copy of this so we have that in case we break it as we move forward. |
|
Copilot the budget overview variables do string concats after i edit. perhaps this should calc should coerce toNumber. perhaps its a framework issue but lets handle it this way for now. otherwise pat yourself on the back because it works really well. now lets change the layout. Lets have budget overview on top span both columns. Then a row with budeget vis cell / actual vis cell. |
Co-authored-by: danmarshall <11507384+danmarshall@users.noreply.github.com>
Fixed both issues in commit df25662: ✅ Budget calculation string concatenation: Added ✅ New layout structure:
🔗 Updated Preview: https://microsoft.github.io/chartifact/view/?load=https://raw.githubusercontent.com/microsoft/chartifact/df25662/packages/web-deploy/json/personal-budget.idoc.json |
|
Copilot beautiful! Now that they are side-by side, we dont need the "budgeted" labels above the inputs for actual. |
…for all 9 categories Co-authored-by: danmarshall <11507384+danmarshall@users.noreply.github.com>
Made all requested changes in commit 1e17218: ✅ Removed "budgeted" labels from actual spending inputs since they're now side-by-side with budget sliders 🔗 Updated Preview: https://microsoft.github.io/chartifact/view/?load=https://raw.githubusercontent.com/microsoft/chartifact/1e17218/packages/web-deploy/json/personal-budget.idoc.json All budget categories now have complete functionality - you can adjust budgets with sliders, track actual spending with inputs, and see variances for all 9 categories in the chart! |
|
Copilot lets move the monthly income slider to the overview |
Co-authored-by: danmarshall <11507384+danmarshall@users.noreply.github.com>
Moved the monthly income slider to the overview section in commit d1e5488. The slider is now positioned at the top with the budget summary information for better visibility and workflow. 🔗 Updated Preview: https://microsoft.github.io/chartifact/view/?load=https://raw.githubusercontent.com/microsoft/chartifact/d1e5488/packages/web-deploy/json/personal-budget.idoc.json |
|
Copilot this is stellar. One last cherry on the top is for the variance chart negative value should be green and overspent should be red. |
…overspent Co-authored-by: danmarshall <11507384+danmarshall@users.noreply.github.com>
Added color coding to the variance chart in commit 3e7e09d. Negative values (under budget) now display in green and positive values (overspent) display in red for better visual feedback. 🔗 Updated Preview: https://microsoft.github.io/chartifact/view/?load=https://raw.githubusercontent.com/microsoft/chartifact/3e7e09d/packages/web-deploy/json/personal-budget.idoc.json |
|
Copilot that gives 404. Also we can delete the old file because I’m happy with our latest |
Co-authored-by: danmarshall <11507384+danmarshall@users.noreply.github.com>
Fixed the preview link and removed the backup file as requested in commit 1b5dc67. |
sum(pluck())function calls with proper Vega aggregate transformations ("ops": ["sum"])${{variableName}}interpolation from labels to match established patterns in other examplesdataSourceNameswithdataFrameTransformationsandformulatransforms to ensure charts update in real-time when sliders are movedpersonal-budget-backup.idoc.jsonas example is now completevariableIdtodataSourceNamefor proper tabulator configurationbudgetVarianceDatato use separate formulas for updating spent values from variables, then calculating variances - debug table now shows current spent amountstoNumber()coercion to all budget calculation variables to prevent string concatenation after textbox editsKey Technical Fix: Used the proper variable-based pattern with
dataFrameTransformationscontainingformulatransforms instead of chart inline data. This ensures proper reactivity when slider values change by leveraging the established transform system for object-type variables with array support.Latest Update: Removed backup file and finalized the personal budget example. The variance chart uses green for under-budget categories and red for overspent categories, providing clear visual feedback on budget performance.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.