Help

Help Vega-Lite line graph

Topic Labels: Extensions
837 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Alexandre_Piarr
4 - Data Explorer
4 - Data Explorer

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