User:Pietrasagh/graphen

From mediawiki.org

Module for Vega 5

  • Differences of vega 2 and vega 5](#differences-vega-2-i-vega-5)
    • Significant differences in syntax](#significant-differences-in-encoding)
      • Marks and Visual Encoding](#marks-and-visual-encoding)
      • Signals and Event Processing](#signals-and-event-processing)
      • View Layout](#view-layout)
      • Axes and Legends](#axes-and-legends)
      • Scales](#scales)
      • Data Transforms](#data-transforms)
      • Geo Data](#geo-data)
    • What's easier, what's harder](#what's-easier-what's-harder)
  • Make-scheme-of-what-is](#make-scheme-of-what-is).
    • Current status](#current-status)
      • Constants](#constants)
      • Auxiliary functions](#auxiliary-functions)
      • Main functions](#main-functions)
    • What can be discarded or changed](#what-can-be-discarded-or-changed)
    • Track all bagaroud errors in vega 2](#trace-all-workaroud-errors-in-vega-2)
  • New module](#new-module)



Differences vega 2 and vega 5[edit]

Vega porting guide

Significant differences in syntax[edit]

Marks and Visual Encoding[edit]

sdsds

  1. data - allowed types are boolean, date, number or string,` default ``auto maybe try as default way?
  2. properties - encode.
  3. template removed, use signal for texts
  4. band interpolation something there blah blah blah, check for bar graphs
  5. facet removed
  6. transform not allowed, all must be in data but this can now be nested in marks
  7. facet not allowed
  8. new shape works like path but better
  9. new z-index meaning order
  10. axies must have 'orient' and 'scale' argument

Signals and Event Processing[edit]

  1. streams -> on, type -> events, expr -> update.
  2. eventItem, eventGroup, eventX, and eventY -> item, group, x and y, new [x,y].

View Layout[edit]

  1. viewport removed, instead use CSS width/height/overflow.
  2. new autosize.

Axes and Legends[edit]

  1. type -> orient, {type: "x"} -> {"orient": "bottom"}, {type: "y"} -ends 1, {"orient": "left"}.
  2. "ticks" (which did not work...) -> "tickCount".
  3. interactive in legends: give in automation some highlighting or what?
  4. axis-layer -> axis-zindex.
  5. messed up with ticks and grid - check
  6. in domain field -> fields.

Scales[edit]

  1. ordnal divided into ordinal, band, point.
  2. colors can have palettes ag names
  3. category10, category20 ni mo!

Data Transforms[edit]

Generally mixed up and minefield....

  1. output removed, use as but need to read
  2. formula-field -> as 3.pie stack bin no layout_mid
  3. aggregate no longer has summarize.
  4. bin: min&max extend-[min, max], div->divide.
  5. filter-test -> expr.
  6. sort deleted
  7. stack-sortby -> sort.

Geo Data[edit]

  1. projections are now top-level
  2. geo -> geopoint.
  3. geopath -> geoshape faster rendering.

What's easier, what's harder[edit]

Make a diagram of what is[edit]

Current state[edit]

Constants[edit]

local baseMapDirectory = "Module:Diagrams/" -- stuck to local wiki
local persistentGrey = "#54595d"
local shapes = {...} 
local dashes = {...}  - see if they are predefined

auxiliary functions[edit]

local function numericArray(csv)
local function stringArray(text)
local function isTable(t)
local function copy(x)
(...)

main functions[edit]

local function p.map()
local function p.chart()
local function wrappery()

What can be discarded or changed?[edit]

Trace all workaroud errors in vega 2[edit]

New module[edit]

Errors reported in Graph|Chart:talk.[edit]

Do a cleanup[edit]

Preprocessing of input data[edit]

At maybe change approach to data and take as entered and then transform -> ....[edit]