Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Help Vega-Lite line graph

Topic Labels: Extensions
340 0
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi,
I’m trying to create a line chart representing a cash flow with Vega Lite.
In my main table I have record that are cash transactions with a date and an amount (either positive or negative).
I want to display my bank balance for each month: in February I want to have January + February and not only February.
Does anyone has an idea on how to do it ?
Thanks

Here is my vega code:

{
  "$schema": "https://vega.github.io/schema/vega-lite/v4.json",
  "title": "Solde mois par mois",
  "width": "container",
  "height": "container",
  "mark": {
      "type": "line",
      "point": true,
      "tooltip": true
    },
  "encoding": {
    "x": {
      "field": "TECH Cash flow date",
      "title": "Mois",
      "timeUnit": "month",
      "type": "nominal"
    },
  "y": {
      "field": "Cash Flow (pondéré)",
      "aggregate": "sum",
      "title": "Solde bancaire (€)",
      "type": "quantitative"
    }
  }  
}
0 Replies 0