Skip to content

Commit

Permalink
update Vega-Lite backend geom mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Vindaar committed May 6, 2024
1 parent 4c93337 commit f3c0384
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/ggplotnim/ggplot_vega.nim
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ const vegaLiteTmpl = """
"""

let mapping = { "title" : "title" }.toTable
let geom_mapping = { "geom_point" : "point",
"geom_rect" : "rect",
"geom_line" : "line",
"geom_histogram" : "bar",
"geom_bar" : "bar",
"geom_freqpoly" : "line",
"geom_tile" : "rect",
"geom_text" : "text",
"geom_raster" : "rect", # or image?,
"geom_errorbar" : "errorbar" # non trivial because they are split in vega
let geom_mapping = { "point" : "point",
"rect" : "rect",
"line" : "line",
"histogram" : "bar",
"bar" : "bar",
"freqpoly" : "line",
"tile" : "rect",
"text" : "text",
"raster" : "rect", # or image?,
"errorbar" : "errorbar" # non trivial because they are split in vega
}.toTable

template toVegaField(f: string): string =
Expand Down

0 comments on commit f3c0384

Please sign in to comment.