A visualization grammar.

Overview

Vega: A Visualization Grammar

Vega Examples

Vega is a visualization grammar, a declarative format for creating, saving, and sharing interactive visualization designs. With Vega you can describe data visualizations in a JSON format, and generate interactive views using either HTML5 Canvas or SVG.

For documentation, tutorials, and examples, see the Vega website. For a description of changes between Vega 2 and later versions, please refer to the Vega Porting Guide.

Build Instructions

For a basic setup allowing you to build Vega and run examples:

  • Clone https://github.com/vega/vega.
  • Run yarn to install dependencies for all packages. If you don't have yarn installed, see https://yarnpkg.com/en/docs/install. We use Yarn workspaces to manage multiple packages within this monorepo.
  • Once installation is complete, run yarn test to run test cases, or run yarn build to build output files for all packages.
  • After running either yarn test or yarn build, run yarn serve to launch a local web server — your default browser will open and you can browse to the "test" folder to view test specifications.

This repository includes the Vega website and documentation in the docs folder. To launch the website locally, first run bundle install in the docs folder to install the necessary Jekyll libraries. Afterwards, use yarn docs to build the documentation and launch a local webserver. After launching, you can open http://127.0.0.1:4000/vega/ to see the website.

ES5 Support

For backwards compatibility, Vega includes a babel-ified ES5-compatible version of the code in packages/vega/build-es5 directory. Older browser would also require several polyfill libraries:

<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.4.4/polyfill.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/runtime.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/fetch.umd.min.js"></script>

Contributions, Development, and Support

Interested in contributing to Vega? Please see our contribution and development guidelines, subject to our code of conduct.

Looking for support, or interested in sharing examples and tips? Post to the Vega discussion forum or join the Vega slack organization! We also have examples available as Observable notebooks.

If you're curious about system performance, see some in-browser benchmarks. Read about future plans in our roadmap.

Comments
  • width/height do not fully determine final graph size

    width/height do not fully determine final graph size

    When backend generates a graph, it needs to know the final size of the image in order to eliminate FOUC. This is especially important if the graph image is server-side generated - the HTML would need to contain the width/height of the image, so that the browser can lay out the page even before the image gets downloaded. The problem is that if the graph is user contributed, there is no way for the server to know the right size. We have been using top level width/height elements, but they are not the final results - vega can unexpectedly resize based on the presence of legend, marks whose coordinates are outside of 0..width x 0..height, large number of ordinal items in a scale, etc.

    I think that before Vega3 is out, we really should clean up this aspect. Without this, we cannot reliably generate HTML, nor can we effectively support mobile devices, as they are tightly coupled with the screen sizes.

    opened by nyurik 25
  • Add Arrow/Feather reader

    Add Arrow/Feather reader

    There's been some discussion over in the Feather repo about using the Arrow JS implementation to add an Apache Arrow IPC interface to Vega/Vega-lite.

    Adding this to Vega would save serialization costs when bringing data in from other contexts (like Altair does), allowing users to leverage Vega's aggregation and visualization capabilities while reading from arrow data with zero copies.

    I'd love to support this endeavor - I'm familiar with Apache Arrow JS so I can absolutely support from that side, but I don't know much about the Vega codebase so I would need assistance there.

    cc @wesm @jakevdp @ellisonbg

    feature-request 
    opened by TheNeuralBit 23
  • Add

    Add "flatten" transformation

    A very common usecase we see with Elasticsearch results is visualizing multi-level aggregation results such as these, or in a simplified form:

    [
      { key:'a', nested: [ {v:1}, {v:2} ]}
      { key:'b', nested: [ {v:3}, {v:4}, {v:5} ]}
    ]
    

    which needs to be flattened out into a form usable by Vega:

    [ {key:'a', v:1}, {key:'a', v:2}, {key:'b', v:3}, {key:'b', v:4}, {key:'b', v:5} ]
    

    I would like to propose a flatten transform with these params. I think some of them are similar to the lookup transform.

    {
      type: "flatten",
    
      // Should work the same way as "format.property" in "data",
      // e.g. allow values like "subfield[0].subsubfield".
      property: "nested"
    
      // Optionally keep just these fields from the current object (performance)
      // otherwise will keep everything.
      // For the above example, we don't need to keep the "nested" field in the result
      parentFieldsToKeep: ["key"]
    
      // Optionally copy just the selected values (performance)
      // otherwise will copy everything. Similar to "values" in lookup transform.
      // The above example has only the "v" field anyway, so this line has no effect.
      values: ["v"]
    
      // Optional, similar to "as" in lookup transform.
      // If subfieldToCopy is given, must be an array of the same size, otherwise must be a string.
      // For array, specifies that "v" (from above) should be set as "newV" in the object.
      // When copying the whole object, this is the 
      as: ["newV"]
    }
    

    Needs better param names.

    Flattening object subvalues

    This portion could be implemented at a later date. I did see a case like this, but I think this is less frequent than the above. Transform params are TBD.

    [
      { key:'a',  nested: {foo:1, bar:2}}
      { key:'b',  nested: {foo:3, bar:4, baz:5}}
    ]
    

    Expected result could be one of these. Either treat object as an array of one element:

    [ {key:'a', foo:1, bar:2}, {key:'b', foo:3, bar:4, baz:5} ]
    

    or convert each key-value pair into a separate object:

    [
     {key:'a', k:'foo', v:1}, {key:'a', k:'bar', v:2},
     {key:'b', k:'foo', v:3}, {key:'b', k:'bar', v:4}, {key:'b', k:'baz', v:5}
    ]
    

    The second case can be enabled with a flattenObjects: ["k", "v"], specifying the key-value field names. If the value is false, autoconvert objects to single value arrays. The default is TBD.

    Flattening other values

    In case the value is neither an array nor an object, we could treat it similar to the second variant of the object expansion. It becomes equivalent to a formula transform.

    [ { key:'a', nested: "meaning" },  { key:'b', nested: 42 } ]
    
    [ {key:'a', v:'meaning'}, {key:'b', v:42} ]
    

    Multi-level and multi-item flattening

    This could be solved by chaining several flatten transforms together. @jheer, if there is a significant performance hit of using several chained transforms to achieve this, lets define how to parametrize this. Otherwise, not worth it.

    There are two cases when multiple flattening operations may be required: multiple lists in the same object under different fields:

    [
      { key:'a',  nested1: [ {v:1}, {v:2} ],  nested2: [ {v:3}, {v:4} ]}
      { key:'b',  nested1: [ {v:5}, {v:6} ],  nested2: [ {v:7}, {v:8} ]}
    ]
    

    The second case is sub-level with sub-sub-level

    [
      { key:'a',  nested: [ { sub: [ {v:1}, {v:2} ] }, { sub: [ {v:3}, {v:4} ]}]}
      { key:'b',  nested: [ { sub: [ {v:5}, {v:6} ] }, { sub: [ {v:7}, {v:8} ]}]}
    ]
    

    This array of 8 values is the expected result in both cases:

    [
     {key:'a', v:1}, {key:'a', v:2}, {key:'a', v:3}, {key:'a', v:4},
     {key:'b', v:5}, {key:'b', v:6}, {key:'b', v:7}, {key:'b', v:8}
    ]
    
    feature-request 
    opened by nyurik 22
  • Problem with npm build of vega

    Problem with npm build of vega

    I am using vega in another npm package and am having some build problems with it. When I try to build everything, I find that vega isn't able to resolve some packages that are declared as dev dependencies but not runtime dependencies. More specifically I had to add the following to my package.json:

      "dependencies": {
        "browserify-shim": "^3.8.10",
        "browserify-versionify": "^1.0.6",
        "jstransform": "^11.0.3",
        "through": "^2.3.8",
        "vega": "^2.2.4",
        "vega-lite": "^0.7.15",
      },
      "browserify-shim": {
        "d3": "global:d3",
        "d3.layout.cloud": "global:d3.layout.cloud",
        "canvas": "global:canvas",
        "topojson": "global:topojson"
      },
    

    To get it to work. Are these meant to be actual dependencies or is something else off?

    question documentation 
    opened by ellisonbg 21
  • feat: add support for aria properties with defaults for guides

    feat: add support for aria properties with defaults for guides

    vega-parser

    • Add support for ariaLabel, ariaRole, ariaRoleDescription, and ariaHidden to encodings, axes, legends, and titles.
    • Automatically set the role of guide groups to graphics-object.
    • Create default descriptions for axes and legends.
    • Set default aria role and aria role description for marks.

    vega-schema

    • Add support for ariaLabel, ariaRole, ariaHidden, and ariaRoleDescription to encodings, axes, legends, and titles.

    vega-scenegraph

    • Add support for ariaLabel, ariaRole, ariaHidden, and ariaRoleDescription to SVG renderer.

    vega-typings

    • Add ariaLabel, ariaRole, ariaHidden, and ariaRoleDescription to encodings, axes, legends, and titles.

    Now we can support https://blog.tenon.io/accessible-charts-with-aria and https://www.w3.org/TR/graphics-aria-1.0/.

    To document:

    • What aria properties are exposed, what are the defaults.
    • Best practices for adding aria labels to marks.
    • Best practices for adding aria labels to groups to allow screen reader users to skip over large numbers of marks.
    blocking VL 
    opened by domoritz 19
  • Tooltip hover not working properly on Windows PC - Vega 4.2.0

    Tooltip hover not working properly on Windows PC - Vega 4.2.0

    Hello,

    My team and I are using Vega 4.2.0 (We would prefer not to upgrade to the latest version as it may break other parts of our app) and are encountering odd behavior with the tooltip only on Windows PC. For the bar charts, the tooltip does not correlate with where the user hovers the cursor. And for the line charts, the hover does not appear at all over the points.

    Screenshots: tooltip1 tooltip2

    We have tested on different Windows and Mac computers and in the following browsers with these specs:

    • Chrome Version 76.0.3809.100
    • Firefox Version 68.0.1
    • Microsoft Edge 44.18362.1.0

    The results seem consistent in that only Windows PCs experience this issue and it occurs in all browsers.

    We have a test build, which you can use to reproduce the issue with here: http://alpha.blueraster.io/gfw-mapbuilder/new-report-consolidated-builds/default/

    To replicate:

    1. Click on the pencil icon in the right panel.
    2. Click on the Start Drawing orange button.
    3. Draw a shape anywhere there's land on the map (shape must have a minimum of 3 points (triangle) to close. Double-click to close.)
    4. Select an analysis from the dropdown in the left panel.
    5. Click on Print Report button.
    6. The report view will generate Vega Charts for each analysis (some might fail or take some time to generate).
    7. Hover over the bars in CO2 EMISSIONS FROM BIOMASS LOSS or the points in GLAD ALERTS PER MONTH (other bar charts appear slightly off as well).

    For our Vega specs, here is the API call for the CO2 EMISSIONS FROM BIOMASS LOSS bar chart as an example: https://api.resourcewatch.org/v1/widget/ac38fdbd-fdb1-4d8e-9109-674013fb51a2?period=2001-01-01,2018-12-31&thresh=30&geostore=277e65fb0fbf5c6fb8f73143e559fc38& All of the specs for our charts are set up in a similar manner. We also add in {"type": "fit", "resize": true} and a signal to override the width:

    {
              name: "width",
              update: "containerSize()[0]*0.95",
              value: "",
              on: [
                {
                  events: {
                    source: "window",
                    type: "resize"
                  },
                  update: "containerSize()[0]*0.95"
                }
              ]
    }
    

    My team and I appreciate any assistance or suggestions on how to fix this bug. Thanks!

    opened by KaylaKremer 17
  • Logo and Branding for Vega and Vega-Lite

    Logo and Branding for Vega and Vega-Lite

    Vega still lives without a logo but it would be nice to have some recognizable branding.

    We could go with the logo style that Altair uses: https://github.com/altair-viz/altair/issues/212#issuecomment-338428670

    image

    Let's use this thread for further proposals and discussions.

    opened by domoritz 17
  • Optional `metadata` field

    Optional `metadata` field

    An optional metadata field at the top level of Vega and Vega-Lite specs can be used to add additional information to a spec that is ignored by the compiler. this metadata could be used by some custom preprocessing step.

    @kanitw @jheer @arvind, please reply with 👍 or 👎 so that @ericsoco can move forward.

    opened by domoritz 17
  • Responsive charts based on container size

    Responsive charts based on container size

    This is a Vega 3 feature request: Provide a way to resize the graph based on the container's height/width.

    With a combination of the window resize event and windowSize expression, there's a way to resize the graph based on the window's dimensions but not the container.

    I've been told a workaround is to update the view instance with the containers height/width on window resize.

    Example:

    $(window).on('resize', function() {
        // assume I have an element and viewInstance variables representing
        // the container, and vega View instance, respectively. 
        const $element = $(element)
        const width = $element.width();
        const height = $element.height();
        viewInstance.width(width).height(height).run();
    });
    

    Perhaps there is an easier and more elegant way to do this within Vega?

    feature-request 
    opened by GCheung55 17
  • Vega-Interpreter/Angular 9: CSP unsafe-eval still needs to be activated

    Vega-Interpreter/Angular 9: CSP unsafe-eval still needs to be activated

    Hallo,

    I am trying to use Vega-Interpreter in Angular 9 together with vega embed. In my CSP I do not allow unsafe-eval.

    I have all my Vega logic in one service. Here is the relevant code snippet:

    [..]
    
    import * as vegainterpret from 'vega-interpreter';
    import embed, {Mode,VisualizationSpec} from 'vega-embed';
    import { Renderers } from 'vega';
     [..]
    
        embedOpts.config={};
                embedOpts.config.ast=true;
           await embed(element, spec, embedOpts);
            
    

    Chrome throws the following error related to the CSP:

    ncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' 'unsafe-inline'".
        at Function (<anonymous>)
        at field.js:10
        at Module../node_modules/vega-tooltip/node_modules/vega-util/src/accessors.js (accessors.js:6)
        at __webpack_require__ (bootstrap:79)
        at Module../node_modules/vega-tooltip/node_modules/vega-util/index.js (index.js:1)
        at __webpack_require__ (bootstrap:79)
        at Module../node_modules/vega-tooltip/build/src/formatValue.js (formatValue.js:1)
        at __webpack_require__ (bootstrap:79)
        at Module../node_modules/vega-tooltip/build/src/Handler.js (Handler.js:1)
        at __webpack_require__ (bootstrap:79)
    

    I am not sure if further parts of Vega are affected as Chrome probably shows only the first issue and not the subsequent ones.

    This means I cannot activate CSP for the whole application.

    Did I apply the vega-interpreter wrongly? If not, how should I apply it? If yes, does the vega-interpreter only apply with embed, but not during general loading of the Vega modules?

    Thank you a lot.

    bug 
    opened by jornfranke 16
  • Incorrect types for Legend typings

    Incorrect types for Legend typings

    The Legend typings size, shape, strokeDash, strokeWidth, and opacity are all string, which seems incorrect. I believe this is what leads to the vega-lite schema for Legend not showing strokeWidth, even though it is present in LegendConfig: https://github.com/vega/vega-lite/blob/f72d8be7fba154437ceaf51ec332d066c1e89313/build/vega-lite-schema.json#L7311

    opened by marcprux 16
  • chore(deps-dev): bump @babel/core from 7.17.8 to 7.20.12

    chore(deps-dev): bump @babel/core from 7.17.8 to 7.20.12

    Bumps @babel/core from 7.17.8 to 7.20.12.

    Release notes

    Sourced from @​babel/core's releases.

    v7.20.12 (2023-01-04)

    Thanks @​cross19xx, @​JBYoshi and @​nmn for your first PRs!

    :bug: Bug Fix

    • babel-traverse
    • babel-helper-create-class-features-plugin, babel-plugin-proposal-class-properties

    :nail_care: Polish

    • babel-traverse

    Committers: 5

    v7.20.11 (2022-12-23)

    :eyeglasses: Spec Compliance

    • babel-helper-module-transforms, babel-plugin-proposal-dynamic-import, babel-plugin-transform-modules-amd, babel-plugin-transform-modules-commonjs, babel-plugin-transform-modules-systemjs

    :bug: Bug Fix

    • babel-plugin-transform-block-scoping

    Committers: 2

    v7.20.10 (2022-12-23)

    :bug: Bug Fix

    Committers: 2

    v7.20.9 (2022-12-23)

    :bug: Bug Fix

    • babel-plugin-transform-block-scoping

    ... (truncated)

    Changelog

    Sourced from @​babel/core's changelog.

    v7.20.12 (2023-01-04)

    :bug: Bug Fix

    • babel-traverse
    • babel-helper-create-class-features-plugin, babel-plugin-proposal-class-properties

    :nail_care: Polish

    • babel-traverse

    v7.20.11 (2022-12-23)

    :eyeglasses: Spec Compliance

    • babel-helper-module-transforms, babel-plugin-proposal-dynamic-import, babel-plugin-transform-modules-amd, babel-plugin-transform-modules-commonjs, babel-plugin-transform-modules-systemjs

    :bug: Bug Fix

    • babel-plugin-transform-block-scoping

    v7.20.10 (2022-12-23)

    :bug: Bug Fix

    v7.20.9 (2022-12-23)

    :bug: Bug Fix

    • babel-plugin-transform-block-scoping

    v7.20.8 (2022-12-22)

    :bug: Bug Fix

    • babel-plugin-transform-block-scoping
    • babel-plugin-proposal-class-properties, babel-traverse

    v7.20.7 (2022-12-22)

    :eyeglasses: Spec Compliance

    • babel-helper-member-expression-to-functions, babel-helper-replace-supers, babel-plugin-proposal-class-properties, babel-plugin-transform-classes
    • babel-helpers, babel-plugin-proposal-class-properties, babel-plugin-transform-classes, babel-plugin-transform-object-super

    :bug: Bug Fix

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies javascript 
    opened by dependabot[bot] 0
  • chore(deps): bump json5 from 2.2.1 to 2.2.3

    chore(deps): bump json5 from 2.2.1 to 2.2.3

    Bumps json5 from 2.2.1 to 2.2.3.

    Release notes

    Sourced from json5's releases.

    v2.2.3

    v2.2.2

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).
    Changelog

    Sourced from json5's changelog.

    v2.2.3 [code, diff]

    v2.2.2 [code, diff]

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).
    Commits
    • c3a7524 2.2.3
    • 94fd06d docs: update CHANGELOG for v2.2.3
    • 3b8cebf docs(security): use GitHub security advisories
    • f0fd9e1 docs: publish a security policy
    • 6a91a05 docs(template): bug -> bug report
    • 14f8cb1 2.2.2
    • 10cc7ca docs: update CHANGELOG for v2.2.2
    • 7774c10 fix: add proto to objects and arrays
    • edde30a Readme: slight tweak to intro
    • 97286f8 Improve example in readme
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies javascript 
    opened by dependabot[bot] 0
  • Force Transform Extends Chart Canvas

    Force Transform Extends Chart Canvas

    The force transform, specifically the x and y forces, seem to be doing some strange things to the chart positioning on the canvas. Below is a minimum reproducible example.

    image

    
    {
      "$schema": "https://vega.github.io/schema/vega/v5.json",
    
      "width": 800,
      "height": 800,
      "padding": 0,
      
      "data": [
        {
          "name": "table",
          "values": [
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
           {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
                   {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
                   {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
                   {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
                   {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
                   {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
                   {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
                   {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
                   {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250},
            {"x": 250, "y": 250}
          ]
        }
      ],
      "scales": [
        {
          "name": "x",
          "type": "linear",
          "domain": [0,500],
          "range": "width"
        },
        {
          "name": "y",
          "type": "linear",
          "domain": [0,500],
          "reverse": true,
          "range": "height"
        },
        {
          "name": "color",
          "type": "linear",
          "nice": true,
          "domain": {"data": "table", "field": "x"},
          "range": {"scheme": "turbo"}
        }
      ],
      "axes": [
        {"orient": "bottom", "scale": "x"},
        {"orient": "left", "scale": "y"}
      ],
      "marks": [
        {
          "name": "marks",
          "type": "symbol",
          "from": {"data": "table"},
          "encode": {
            "enter": {
              "size": {"value": 145},
              "fill": {"scale": "color", "field": "x"}
            },
            "update": {
              "strokeWidth": {"value": 10},
              "tooltip": {"signal": "item"},
              "stroke": {"value": "transparent"},
              "xfocus": {
                "scale": "x",
                "signal": "random() *500"
              },
              "yfocus": {
                "scale": "y",
                "signal": "random()*500"
              }
            }
          },
          "transform": [
            {
              "type": "force",
              "restart": true,
              "iterations": 800,
              "alphaMin": 0.00001,
              "static": false,
              "forces": [
                {"force": "x", "x": "xfocus", "strength": 1},
                {"force": "y", "y": "yfocus", "strength": 1}
              ]
            }
          ]
        }
      ]
    }
    

    If you change the strength of the x and y forces in the above spec to 0.1, the following happens (observe position of axes gets shifted down and right creating white space at the top and left). The more particles in combination with very high or very low but equal x and y strengths make the problem even more apparent. I have a chart where I currently have to create a negative left and right padding to fit on the canvas.

    image

    bug 
    opened by PBI-David 0
  • view.finalize() throws an error when an event stream is configured to monitor a DOM element

    view.finalize() throws an error when an event stream is configured to monitor a DOM element

    Summary

    When an event stream selector uses a CSS selector to monitor a DOM element, view.finalize() throws an error by attempting to call removeEventListener() on a NodeList. I am encountering this issue on Vega version 5.22.1.

    Reproduction steps

    A minimal reproduction is available here: https://codepen.io/ravron/pen/wvxoWep

    Alternatively:

    1. Create a signal attached to a button id with a CSS selector (see example spec below)
    2. Create a view, like:
      view = new vega.View(vega.parse(spec))
        .renderer("svg")
        .initialize("#chart")
        .run();
      
    3. Call view.finalize()

    Expected behavior

    No errors appear in the console, and all event listeners are removed.

    Actual behavior

    The following error is observed in the console:

    Uncaught TypeError: n.sources[e].removeEventListener is not a function
        at HT.finalize (vega-view.module.js:385:20)
        at pen.js?key=pen.js-e7acd024-1796-2f60-e004-8dc0d83e7a07:21:6
    

    and the event listener is not removed from the button.

    Example spec

    {
      schema: "https://vega.github.io/schema/vega/v3.json",
      width: 500,
      height: 200,
    
      signals: [
        {
          name: "button",
          value: false,
          on: [
            { events: "#button:clicked", update: "true" }
          ]
        }
      ]
    }
    

    Suspect code

    The source of the problem is as follows. When tracking event listeners, function trackEventListener calls the array utility function on sources. When the source is a DOM element, sources is a NodeList. Unfortunately, the array function simply checks if something is a literal array, and if not, wraps it in one. Because a isArray(NodeList) === false, trackEventListener ends up recording an array with one element, a NodeList.

    Later, finalize calls removeEventListener on each element of the sources array. Because in this case the sources array contains just one NodeList, finalize calls removeEventListener on a NodeList, which is undefined and causes the error observed.

    I suggest wrapping document.querySelectorAll() in Array.from() here. This would convert the NodeList to an actual array, and it would prevent array() from wrapping it in another array.

    bug 
    opened by ravron 0
  • chore(deps-dev): bump eslint from 8.11.0 to 8.31.0

    chore(deps-dev): bump eslint from 8.11.0 to 8.31.0

    Bumps eslint from 8.11.0 to 8.31.0.

    Release notes

    Sourced from eslint's releases.

    v8.31.0

    Features

    • 52c7c73 feat: check assignment patterns in no-underscore-dangle (#16693) (Milos Djermanovic)
    • b401cde feat: add options to check destructuring in no-underscore-dangle (#16006) (Morten Kaltoft)
    • 30d0daf feat: group properties with values in parentheses in key-spacing (#16677) (Francesco Trotta)

    Bug Fixes

    • 35439f1 fix: correct syntax error in prefer-arrow-callback autofix (#16722) (Francesco Trotta)
    • 87b2470 fix: new instance of FlatESLint should load latest config file version (#16608) (Milos Djermanovic)

    Documentation

    • 4339dc4 docs: Update README (GitHub Actions Bot)
    • 4e4049c docs: optimize code block structure (#16669) (Sam Chen)
    • 54a7ade docs: do not escape code blocks of formatters examples (#16719) (Sam Chen)
    • e5ecfef docs: Add function call example for no-undefined (#16712) (Elliot Huffman)
    • a3262f0 docs: Add mastodon link (#16638) (Amaresh S M)
    • a14ccf9 docs: clarify files property (#16709) (Sam Chen)
    • 3b29eb1 docs: fix npm link (#16710) (Abdullah Osama)
    • a638673 docs: fix search bar focus on Esc (#16700) (Shanmughapriyan S)
    • f62b722 docs: country flag missing in windows (#16698) (Shanmughapriyan S)
    • 4d27ec6 docs: display zh-hans in the docs language switcher (#16686) (Percy Ma)
    • 8bda20e docs: remove manually maintained anchors (#16685) (Percy Ma)
    • b68440f docs: User Guide Getting Started expansion (#16596) (Ben Perlmutter)

    Chores

    • 65d4e24 chore: Upgrade @​eslint/eslintrc@​1.4.1 (#16729) (Brandon Mills)
    • 8d93081 chore: fix CI failure (#16721) (Sam Chen)
    • 8f17247 chore: Set up automatic updating of README (#16717) (Nicholas C. Zakas)
    • 4cd87cb ci: bump actions/stale from 6 to 7 (#16713) (dependabot[bot])
    • fd20c75 chore: sort package.json scripts in alphabetical order (#16705) (Darius Dzien)
    • 10a5c78 chore: update ignore patterns in eslint.config.js (#16678) (Milos Djermanovic)

    v8.30.0

    Features

    • 075ef2c feat: add suggestion for no-return-await (#16637) (Daniel Bartholomae)
    • 7190d98 feat: update globals (#16654) (Sébastien Règne)

    Bug Fixes

    • 1a327aa fix: Ensure flat config unignores work consistently like eslintrc (#16579) (Nicholas C. Zakas)
    • 9b8bb72 fix: autofix recursive functions in no-var (#16611) (Milos Djermanovic)

    Documentation

    • 6a8cd94 docs: Clarify Discord info in issue template config (#16663) (Nicholas C. Zakas)
    • ad44344 docs: CLI documentation standardization (#16563) (Ben Perlmutter)
    • 293573e docs: fix broken line numbers (#16606) (Sam Chen)
    • fa2c64b docs: use relative links for internal links (#16631) (Percy Ma)
    • 75276c9 docs: reorder options in no-unused-vars (#16625) (Milos Djermanovic)
    • 7276fe5 docs: Fix anchor in URL (#16628) (Karl Horky)
    • 6bef135 docs: don't apply layouts to html formatter example (#16591) (Tanuj Kanti)
    • dfc7ec1 docs: Formatters page updates (#16566) (Ben Perlmutter)

    ... (truncated)

    Changelog

    Sourced from eslint's changelog.

    v8.31.0 - December 31, 2022

    • 65d4e24 chore: Upgrade @​eslint/eslintrc@​1.4.1 (#16729) (Brandon Mills)
    • 35439f1 fix: correct syntax error in prefer-arrow-callback autofix (#16722) (Francesco Trotta)
    • 87b2470 fix: new instance of FlatESLint should load latest config file version (#16608) (Milos Djermanovic)
    • 8d93081 chore: fix CI failure (#16721) (Sam Chen)
    • 4339dc4 docs: Update README (GitHub Actions Bot)
    • 8f17247 chore: Set up automatic updating of README (#16717) (Nicholas C. Zakas)
    • 4e4049c docs: optimize code block structure (#16669) (Sam Chen)
    • 54a7ade docs: do not escape code blocks of formatters examples (#16719) (Sam Chen)
    • 52c7c73 feat: check assignment patterns in no-underscore-dangle (#16693) (Milos Djermanovic)
    • e5ecfef docs: Add function call example for no-undefined (#16712) (Elliot Huffman)
    • a3262f0 docs: Add mastodon link (#16638) (Amaresh S M)
    • 4cd87cb ci: bump actions/stale from 6 to 7 (#16713) (dependabot[bot])
    • a14ccf9 docs: clarify files property (#16709) (Sam Chen)
    • 3b29eb1 docs: fix npm link (#16710) (Abdullah Osama)
    • fd20c75 chore: sort package.json scripts in alphabetical order (#16705) (Darius Dzien)
    • a638673 docs: fix search bar focus on Esc (#16700) (Shanmughapriyan S)
    • f62b722 docs: country flag missing in windows (#16698) (Shanmughapriyan S)
    • 4d27ec6 docs: display zh-hans in the docs language switcher (#16686) (Percy Ma)
    • 8bda20e docs: remove manually maintained anchors (#16685) (Percy Ma)
    • b401cde feat: add options to check destructuring in no-underscore-dangle (#16006) (Morten Kaltoft)
    • b68440f docs: User Guide Getting Started expansion (#16596) (Ben Perlmutter)
    • 30d0daf feat: group properties with values in parentheses in key-spacing (#16677) (Francesco Trotta)
    • 10a5c78 chore: update ignore patterns in eslint.config.js (#16678) (Milos Djermanovic)

    v8.30.0 - December 16, 2022

    • f2c4737 chore: upgrade @​eslint/eslintrc@​1.4.0 (#16675) (Milos Djermanovic)
    • 1a327aa fix: Ensure flat config unignores work consistently like eslintrc (#16579) (Nicholas C. Zakas)
    • 075ef2c feat: add suggestion for no-return-await (#16637) (Daniel Bartholomae)
    • ba74253 chore: standardize npm script names per #14827 (#16315) (Patrick McElhaney)
    • 6a8cd94 docs: Clarify Discord info in issue template config (#16663) (Nicholas C. Zakas)
    • 0d9af4c ci: fix npm v9 problem with file: (#16664) (Milos Djermanovic)
    • 7190d98 feat: update globals (#16654) (Sébastien Règne)
    • ad44344 docs: CLI documentation standardization (#16563) (Ben Perlmutter)
    • 90c9219 refactor: migrate off deprecated function-style rules in all tests (#16618) (Bryan Mishkin)
    • 9b8bb72 fix: autofix recursive functions in no-var (#16611) (Milos Djermanovic)
    • 293573e docs: fix broken line numbers (#16606) (Sam Chen)
    • fa2c64b docs: use relative links for internal links (#16631) (Percy Ma)
    • 75276c9 docs: reorder options in no-unused-vars (#16625) (Milos Djermanovic)
    • 7276fe5 docs: Fix anchor in URL (#16628) (Karl Horky)
    • 6bef135 docs: don't apply layouts to html formatter example (#16591) (Tanuj Kanti)
    • dfc7ec1 docs: Formatters page updates (#16566) (Ben Perlmutter)
    • 8ba124c docs: update the prefer-const example (#16607) (Pavel)
    • e6cb05a docs: fix css leaking (#16603) (Sam Chen)

    v8.29.0 - December 2, 2022

    • 0311d81 docs: Configuring Plugins page intro, page tweaks, and rename (#16534) (Ben Perlmutter)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies javascript 
    opened by dependabot[bot] 0
Releases(v5.22.1)
  • v5.22.1(Mar 25, 2022)

  • v5.22.0(Mar 11, 2022)

    Changes from v5.21.0:

    docs

    • Add Packed Bubble Chart example. (thanks @PBI-David!)
    • Improve TimeUnit transform documentation.

    monorepo

    • Update dependencies, including D3 ESM packages.
    • Update rollup config to bundle ESM packages for CJS use.
    • Update tests to match new dependencies.
    • Bump minor version numbers for all affected modules.

    vega-functions

    • Add lasso selection expression functions. (thanks @dvmoritzschoefl!)
    • Suppress unsupported expression function arguments.

    vega-label

    • Fix to not assume that a label always has some part inside the chart's bounding box. (thanks @chanwutk!)

    vega-scenegraph

    • Fix SVG path close logic. (#3377)
    • Fix SVG renderer dirty check. (#3411).
    • Fix SVG path string parser, update tests. (#3432)
    • Fix SVG mix-blend-mode to use style attribute. (#3435)

    vega-selections

    • Optimize selection functions for ID-only stores. (thanks @arvind!)

    vega-transforms

    • Fix TimeUnit transform updates.

    vega-typings

    • Limit type linting to local TypeScript version only. (thanks @domoritz!)
    • Adjust EventListenerHandler typings. (#3390)
    Source code(tar.gz)
    Source code(zip)
  • v5.21.0(Sep 21, 2021)

    Changes from v5.20.2:

    monorepo

    • Update dependencies.

    vega

    • Update test scenegraphs.

    vega-event-selector

    • (Breaking) Change exported method name.

    vega-expression

    • (Breaking) Change exported method names.

    vega-label

    • Add support for infinite padding, no bounds on label layout. (#3252)

    vega-loader

    • Fix loader so that baseURL is not prepended to data: URLs. (#3195)
    • Minor refactoring.

    vega-parser

    • Update depenencies.

    vega-runtime

    • Dead code elimination for runtime expression instantiation.
    • Minor refactoring.

    vega-statistics

    • Fix sampleCurve utility to properly scale values in angle subdivision test. (#3173)

    vega-typings

    • Update typings. (thanks @danmarshall and @domoritz!)

    vega-util

    • Allow customization of logger handler. (thanks @challet!)
    Source code(tar.gz)
    Source code(zip)
  • v5.20.1(Mar 29, 2021)

    Changes from v5.20.0:

    monorepo

    • Update dependencies.

    vega-dataflow

    • Fix memory leak on dataflow detach. (thanks @krisdages!)

    vega-transforms

    • Fix memory leak on dataflow detach. (thanks @krisdages!)

    vega-typings

    • Update typing comments for bindings and projections to fill-in missing Vega-Lite documentation.
    Source code(tar.gz)
    Source code(zip)
  • v5.20.2(Mar 30, 2021)

  • v5.20.0(Mar 16, 2021)

    Changes from v5.19.1:

    monorepo

    • Update CI configuration. (thanks @domoritz!)
    • Update build configuration. (thanks @domoritz!)
    • Update dependencies.

    vega

    • Add web test for external element binding.

    vega-scenegraph

    • Add early exit for image rendering with zero width or height.

    vega-schema

    • Add signal binding to external input element.

    vega-typings

    • Add signal binding to external input element.

    vega-util

    • Update inherit utility to use defineProperty, avoids upsetting configurations that ban assignment overrides of Object prototype properties. (#3109, thanks @erights!)

    vega-view

    • Add signal binding to external input element.
    Source code(tar.gz)
    Source code(zip)
  • v5.19.1(Jan 21, 2021)

  • v5.19.0(Jan 21, 2021)

    Changes from v5.18.0:

    vega-functions

    • Add pluck expression function. (thanks @arvind!)
    • Add additional Vega-Lite selection helper methods. (thanks @arvind!)

    vega-parser

    • Fix signal check for data source values property. (thanks @domoritz!)

    vega-scenegraph

    • Fix namespace use for SVG metadata. (thanks @mbostock!)
    • Update to JSON schema draft 7. (thanks @domoritz!)

    vega-schema

    • Update to JSON schema draft 7. (thanks @domoritz!)

    vega-selections

    • Add additional Vega-Lite selection helper methods. (thanks @arvind!)
    Source code(tar.gz)
    Source code(zip)
  • v5.18.0(Jan 8, 2021)

    Changes from v5.17.3:

    vega

    • Refactor: import only default from JSON files. (thanks @keller-mark!)

    vega-functions

    • Update vega-selections dependency.

    vega-selections

    • Add Vega-Lite v5 "point" selection support. (thanks @arvind!)
    Source code(tar.gz)
    Source code(zip)
  • v5.17.3(Dec 23, 2020)

    Changes from v5.17.2:

    vega-expression

    • Remove unsafe replace function. (#3027)

    vega-functions

    • Add replace function with input type check. (#3027)

    vega-parser

    • Update dependencies.

    vega-view

    • Update dependencies.
    Source code(tar.gz)
    Source code(zip)
  • v5.17.2(Dec 23, 2020)

    Changes from v5.17.1:

    vega-expression

    • Remove unsafe sequence functions. (#3027)

    vega-functions

    • Add sequence functions with input type checks. (#3027)

    vega-parser

    • Update dependencies.

    vega-schema

    • Fix JSON schema bug (#3025, thanks @domoritz!)

    vega-selections

    • Update dependencies.

    vega-view

    • Update dependencies.
    Source code(tar.gz)
    Source code(zip)
  • v5.17.1(Dec 21, 2020)

    Changes from v5.17.0:

    vega-geo

    • Fix contour quantize bug. (#2994)

    vega-expression

    • Fix XSS vulnerability in expression parser and code generator. (#3018)

    vega-typings

    • Remove incorrect comment for Interpolate type.
    Source code(tar.gz)
    Source code(zip)
  • v5.17.0(Oct 1, 2020)

    Changes from v5.16.1:

    vega-canvas

    • Fix browser index route for ES modules. (#2907)

    vega-loader

    • Add iterable support to JSON loader. Iterable inputs are expanded to arrays, then ingested.
    • Fix browser index route for ES modules. (#2907)

    vega-util

    • Add isIterable utility.
    Source code(tar.gz)
    Source code(zip)
  • v5.16.1(Sep 23, 2020)

  • v5.16.0(Sep 23, 2020)

    Notable Changes

    • The new label transform automatically positions labels without overlapping other marks. (Thanks @chanwutk!)
    • Completes the transition to using vega-datasets 2.0+, including swapping out the Iris dataset for a more adorable Penguins dataset. 🐧
    • Major update of build system to use a centralized rollup configuration. (Thanks @domoritz!)

    Changelog

    Changes from v5.15.0:

    docs

    monorepo

    • Complete transition to vega-datasets 2.0.
    • Use centralized rollup config. (thanks @domoritz!)

    vega

    • Use centralized rollup config. (thanks @domoritz!)
    • Update and extend test specifications.

    vega-canvas

    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)

    vega-crossfilter

    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)

    vega-dataflow

    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)

    vega-encode

    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)

    vega-event-selector

    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)

    vega-expression

    • Use forbidden / allowed, remove blacklist / whitelist (Breaking change)
    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)

    vega-functions

    • Use centralized rollup config. (thanks @domoritz!)
    • Use argument spread syntax. (thanks @lgrammel!)

    vega-force

    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)

    vega-format

    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)

    vega-geo

    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)

    vega-hierarchy

    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)

    vega-interpreter

    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)

    vega-label

    • 1.0.0 release, now integrated into Vega! (thanks @chanwutk!)
    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)

    vega-loader

    • Fix JSON copy option logic. (#2890, thanks @cytomich!)
    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)

    vega-parser

    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)

    vega-projection

    • Use centralized rollup config. (thanks @domoritz!)

    vega-projection-extended

    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)

    vega-regression

    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)

    vega-runtime

    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)
    • Use argument spread syntax. (thanks @lgrammel!)

    vega-scale

    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)

    vega-scenegraph

    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)
    • Use argument spread syntax. (thanks @lgrammel!)

    vega-schema

    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)

    vega-selections

    • Use centralized rollup config. (thanks @domoritz!)
    • Use argument spread syntax. (thanks @lgrammel!)

    vega-statistics

    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)

    vega-time

    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)

    vega-transforms

    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)

    vega-typings

    • Update view typings. (#2846, thanks @domoritz!)
    • Fix image mark config. (#2871, thanks @domoritz!)

    vega-util

    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)

    vega-view-transforms

    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)

    vega-view

    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)

    vega-voronoi

    • Use centralized rollup config. (thanks @domoritz!)

    vega-wordcloud

    • Fix use of var, prefer const and let. (thanks @lgrammel!)
    • Use centralized rollup config. (thanks @domoritz!)
    Source code(tar.gz)
    Source code(zip)
  • v5.15.0(Aug 31, 2020)

    Changes from v5.14.0:

    monorepo

    • Update dependencies, including use of D3 v6 packages.
    • Refactor all packages for JavaScript modernization. (thanks @domoritz & @lgrammel!)

    vega

    • Update vega-core build to use D3 v6.

    vega-scale

    • Add turbo and cividis color palettes. (thanks @mcnuttandrew!)
    Source code(tar.gz)
    Source code(zip)
  • v5.14.0(Aug 18, 2020)

    Notable Changes

    • Update SVG rendering to produce fully compliant XML. (#2672)
    • Major refactoring of the Vega code to be more lean and modern. The main changes are:
      • Use shorthand property method syntax (e.g., rather than assignment to prototype objects).
      • Use arrow functions rather than function declarations where appropriate.
      • Prefer use of let and const to var.
    • Upgrade the documentation examples to use vega-datasets 2.0+, including swapping out the Iris dataset for a more adorable Penguins dataset. 🐧
    • Various bug fixes, documented below.

    Changelog

    Changes from v5.13.0:

    vega-cli

    • Update SVG test output.

    vega-canvas

    • Update to use leaner syntax.

    vega-crossfilter

    • Update to use leaner syntax.

    vega-dataflow

    • Fix EventStream to support detach method. (#2753)
    • Fix Pulse addAll to clear rem set when applicable. This prevents tuple removal from being invoked on newly instantiated operators that never observed those tuples in the first place. (#2605)
    • Update to use leaner syntax.

    vega-encode

    • Update to use leaner syntax.

    vega-event-selector

    • Update to use leaner syntax.

    vega-expression

    • Update to use leaner syntax.

    vega-force

    • Update to use leaner syntax.

    vega-format

    • Update to use leaner syntax.

    vega-functions

    • Update to use leaner syntax.

    vega-geo

    • Update to use leaner syntax.

    vega-hierarchy

    • Update to use leaner syntax.

    vega-label

    • Update to use leaner syntax.

    vega-loader

    • Update to use leaner syntax.

    vega-parser

    • Fix production rule support for guides. (#2754)
    • Update to use leaner syntax.

    vega-projection

    • Update to use leaner syntax.

    vega-regression

    • Update to use leaner syntax.

    vega-scale

    • Update to use leaner syntax.

    vega-scenegraph

    • Add markup and serializeXML utilities for SVG string output. Ensure proper XML output. (#2672)
    • Fix leaky SVG scaleX/Y transforms on non-path marks. (#2738)
    • Fix bounds calculation for rotated paths. (#2780)
    • Fix canvas picking for clipped groups with corner radius and no fill. (#2797)
    • Fix SVG path parsing: support concatenated decimals and implicit lineTo commands. (#2803)
    • Update tests, add xmllint checks to test conformance of SVG output.
    • Update to use leaner syntax.
    • Internal Breaking Change: Update SVGStringRenderer class methods to use markup utility.
    • Internal Breaking Change: Drop openTag, closeTag utilities.

    vega-statistics

    • Update to use leaner syntax.

    vega-time

    • Update to use leaner syntax.

    vega-transforms

    • Update to use leaner syntax.

    vega-view-transforms

    • Update to use leaner syntax.

    vega-view

    • Update to use leaner syntax.

    vega-util

    • Add members argument to inherits utility.
    • Add ascending comparator utility.
    • Update to use leaner syntax.

    vega-voronoi

    • Update to use leaner syntax.

    vega-wordcloud

    • Update to use leaner syntax.
    Source code(tar.gz)
    Source code(zip)
  • v5.13.0(Jun 2, 2020)

    Notable Changes

    • Improved Streaming Performance.

      For performance, Vega caches a lot of internal data structures, including calculated tuples, scenegraph items, and SVG DOM nodes. Previously, nested scopes (such as those created for facetted data) that result in vega-runtime subcontexts were never cleaned. If no external View API calls are made, this is fine, and actually improves performance for interaction-driven dynamic filtering. However, when providing streaming data to Vega through the View API, uncleaned caches and subcontexts can result in substantial memory leaks that also eventually degrade performance.

      This version adds mechanisms for clearing caches and detaching subflows to support streaming data within nested specifications. When input data is removed via a View API call or via signal-valued URL, Vega will now by default trigger garbage collection to reclaim resources. This behavior can be disabled by calling clean(false) on a constructed ChangeSet passed to the View API.

    • Improved Cursor Performance.

      Previously Vega updated the cursor style on the HTML document body. This persists cursor settings even during interactions (such as drags) that may leave the Vega View component. However, it also can result in large performance penalties in Chrome, which re-evaluates CSS styles in response. This version changes the default behavior to set the cursor locally on the Vega View component. If a global cursor is desired, the boolean config property events.globalCursor can be set true or the View method globalCursor can be invoked to change the setting at runtime.

    • Optional Expression Interpreter.

      This release adds interpreter support for Vega expressions that is Content Security Policy (CSP) compliant. By default, the Vega parser performs code generation for parsed Vega expressions, and the Vega runtime uses the Function constructor to create JavaScript functions from the generated code. Although the Vega parser includes its own security checks, the runtime generation of functions from source code nevertheless violates security policies designed to prevent cross-site scripting.

      This release provides an interpreter plug-in (the new vega-interpreter package) that evaluates expressions by traversing an Abstract Syntax Tree (AST) for an expression and performing each operation in turn. Use of the interpreter enables compliance with CSP, but can incur a performance penalty. In tests of initial parse and dataflow evaluation times, the interpreter is on average ~10% slower. Interactive updates may incur higher penalties, as they are often more expression-heavy and amortize the one-time cost of Function constructor parsing.

    Changelog

    Changes from v5.12.3:

    vega

    • Update stream.html and stream-nested.html performance test pages.

    vega-dataflow

    • Add detach method to Operator to remove adjacent edges (listeners) from the dataflow graph.
    • Add clean setter to ChangeSet, set to true by default if any tuples are removed.
    • Add clean getter/setter to Pulse, propagate value to forked pulses if they share a data source.
    • Update logging calls during Dataflow evaluation.

    vega-encode

    • Update DataJoin transform to clean internal map when pulse.clean() is true.
    • Update Scale to include domainMid as an extrema if it exceeds the domain min or max. (#2656)

    vega-functions

    • Fix scale function to not special case undefined input. This ensures identical semantics with the internal _scale helper function used by code-generated encoders.

    vega-geo

    • Update d3-geo dependency.

    vega-interpreter

    • Add new vega-interpreter package.

    vega-projection

    • Update d3-geo dependency.

    vega-projection-extended

    • Update vega-projection dependency.

    vega-runtime

    • Add runtime detach method to remove subcontexts. Export as detachSubflow on the head operator of a generated subflow.
    • Add pluggable expression evaluators.

    vega-statistics

    • Fix numbers utility to exclude empty string.

    vega-transforms

    • Update Aggregate transform to clean internal map when pulse.clean() is true.
    • Update Facet, PreFacet, and Subflow transforms to prune subflows in response to pulse.clean().
    • Update Load transform to set pulse.clean(true) when removing loaded data.
    • Fix Bin and Extent to treat empty string as a missing value. (thanks @domoritz!)
    • Fix aggregate ops to treat empty string as a missing value.

    vega-typings

    • Add eventConfig.globalCursor to config typings.
    • Add dataflow logger to typings.
    • Add parse options to typings.

    vega-util

    • Refactor code for fastmap and visitArray utilities.

    vega-view

    • Add View constructor option expr to pass in a custom expression evaluator.
    • Add globalCursor method and event configuration.
    • Update to make the Vega view container the default cursor target.
    Source code(tar.gz)
    Source code(zip)
  • v5.12.3(May 23, 2020)

    Notable Changes

    The previous Vega v5.12.0 release introduced changes to how SVG was generated, including the addition of an internal stylesheet. However, this leads to integration issues with downstream tools (including at least one popular SVG optimizer) that do not support stylesheet parsing. In addition, local performance tests indicate faster rendering in Chrome when using presentation attributes instead of CSS styling. This version (v5.12.3) now changes the SVG output to favor presentation attributes (fill="blue") over CSS style (style="fill: blue;").

    CSS styles have been removed in all but one case: the use of image-rendering for non-smoothed images, where browser differences require multiple style definitions to appease both Chrome and Firefox, something we can't express with presentation attributes alone. If and when Firefox properly supports image-rendering: pixelated we can consider dropping this last use of CSS.

    Note that external stylesheets can still be used to style Vega SVG content, and may now have higher specificity due to the use of attributes.

    Changelog

    Changes from v5.12.2:

    monorepo

    • Update eslint config to flag trailing commas.

    vega

    • Add initialization timing to test spec viewer page.
    • Remove dangling commas.
    • Update dev dependencies.

    vega-cli

    • Update SVG test cases.

    vega-format

    • Remove dangling commas.

    vega-geo

    • Remove dangling commas.

    vega-hierarchy

    • Remove dangling commas.

    vega-parser

    • Fix trailing function argument commas in axis utils. (#2645, thanks @armanozak!)
    • Remove dangling commas.

    vega-projections-extended

    • Update dev dependencies.

    vega-scenegraph

    • Favor SVG presentation attributes over CSS style. (#2640)
    • Fix clipped group picking for canvas. (#2600)
    • Remove dangling commas, other code clean-up.

    vega-schema

    • Remove dangling commas.

    vega-time

    • Remove dangling commas.

    vega-transforms

    • Remove dangling commas.
    Source code(tar.gz)
    Source code(zip)
  • v5.12.2(May 22, 2020)

    Changes from v5.12.1:

    vega-scenegraph

    • Add canvas handler event listeners necessary for state management. Fixes a regression introduced in v5.12.1. (#2641)

    vega-typings

    • Fix typings for locale specification and View API. (thanks @haldenl!)
    Source code(tar.gz)
    Source code(zip)
  • v5.12.1(May 19, 2020)

    Changes from v5.12.0:

    monorepo

    • Switch from Travis CI to GitHub Actions. (thanks @domoritz!)

    vega-cli

    • Add tests for vega-cli.

    vega-parser

    • Update code style for config constants.

    vega-scenegraph

    • Add class to svg root group, localize SVG stylesheet to that class. (#2618)
    • Lazily register CanvasHandler event listeners. By avoiding unneeded listeners, this change avoids a number of passive listener violation warnings. (#2621)

    vega-transforms

    • Fix regression of string to number conversion in aggregate sum op. (thanks @haldenl!)

    vega-typings

    • Update View typings.
    • Fix missing color schemes in typings. (thanks @domortiz!)

    vega-view

    • Code clean up.
    Source code(tar.gz)
    Source code(zip)
  • v5.12.0(May 15, 2020)

    Notable Additions

    • View-specific locale management for number and date formatting. The View constructor accepts a locale option, and Vega specs support a config.locale property. Locale objects should have number and/or time properties that map to valid d3-format or d3-time-format locale definitions.
    • View toCanvas now accepts an externalContext option to draw into a separately managed canvas instance. For example, one could draw multiple Vega views into the same node-canvas instance for server-side PDF document generation.
    • Initial support for signal-valued axis orient properties. This addition allows the position of an axis (e.g., left versus right) to be dynamically updated at runtime. The feature should be considered experimental; subtle bugs may still arise.
    • Internal refactoring to support content security policy (CSP) in the future. The Vega parser accepts an ast option flag to include generated abstract syntax trees for expressions in the parser output. All Function constructor use for generated code is now consolidated into a single file in the vega-runtime package and could be overridden if an expression AST interpreter is implemented.
    • Bug fixes! See below...

    Changelog

    Changes from v5.11.1:

    vega

    • Update bar-time test specification to test locale config usage.
    • Update budget-forecasts test specification.
    • Update to use refactored runtime context.

    vega-cli

    • Update to use locale view constructor option.

    vega-dataflow

    • Add locale property to set a dataflow-specific locale for number and date formatting.

    vega-encode

    • Update to use centralized locale management. Transforms now access the dataflow-specific locale via the input pulse.

    vega-expression

    • Fix handling of this global variable.

    vega-format

    • New package for format methods that centralizes locale management.

    vega-functions

    • Add centralized locale management. Format functions now access the dataflow-specific locale via the runtime context object, available to expression functions via the this context.
    • Add and export expression parser, support AST export option.
    • Add internal scale functions for use by encoders.
    • Fix scale dependencies: non-literal scale references should depend on all scales.

    vega-geo

    • Fix contour, density2D size setter input checks.

    vega-loader

    • Add UTC parser parameter to read method.
    • Use the default locale when custom time format parsers are not provided.

    vega-parser

    • Internal breaking change: Output runtime specification has changed the encoding of parsed expression functions. Generated code is now wrapped in an object and stored in the code property.
    • Internal breaking change: Generated expression code no longer includes method variable definitions or additional logic. These have been moved to vega-runtime.
    • Add signal support for axis translate property. (Thanks @haldenl!)
    • Add experimental signal support for axis orient property. (Thanks @haldenl!)
    • Add parsing of locale config, include in runtime spec output.
    • Add options argument to parse.
    • Add boolean ast parse option to enable AST output from expression parser.
    • Refactor to use expression parser for synthesized encoder logic.
    • Fix circular dependencies.

    vega-runtime

    • Internal breaking change: The runtime now assumes the updated vega-parser output format. All code generation beyond standard expression parser output has now been consolidated into the runtime parsing process.
    • Propagate locale config to runtime context object.
    • Refactor code, add optimized code generation for accessors and comparators.
    • Refactor all non-standard code generation to the runtime context.
    • Fix circular dependencies.

    vega-scale

    • Internal breaking change: Update to use centralized locale management. Formatting methods now require a locale parameter as the first argument.
    • Fix valid tick method to sort ticks based on scale range values. (#2579)

    vega-scenegraph

    • Add externalContext CanvasRenderer option. (Thanks @pixelspark!)
    • Add resetSVGDefIds to reset gradient and clip id counter. (Thanks @kanitw!)
    • Add SVG style block, set default fill and miter limit values. (#2498)
    • Update SVG test outputs.
    • Update to use centralized locale management. The ARIA caption generators access the dataflow-specific locale via the runtime context object.
    • Update reference to axis orient.
    • Fix SVG radial gradient pattern fill to use style, not fill attribute.
    • Fix ampersand escape in SVG attributes. (#2608)
    • Fix CSS fill inherit for tspan.

    vega-schema

    • Add axis translate signal support to schema.
    • Add signal-valued axis orient to schema.

    vega-time

    • Internal breaking change: Remove formatting methods, which are now part of vega-format.

    vega-transforms

    • Update aggregation ops to no longer use the Function constructor.
    • Update dependencies.

    vega-typings

    • Add externalCanvas render option to typings.
    • Add axis translate signal support to typings.
    • Add signal-valued axis orient to typings.

    vega-util

    • Update field, key, and compare methods to no longer use the Function constructor.
    • Add optional arguments to inject optimized code generators for accessors and comparators.

    vega-view

    • Add locale input options and config handling.
    • Update to use refactored runtime context.

    vega-view-transforms

    • Add signal support for axis translate property.
    • Update reference to axis orient.
    • Fix ViewLayout reflow to ensure group bounds are updated. (#2568)
    • Fix grid layout calculations with empty grid input. (#2541)

    vega-wordcloud

    • Update dependencies.
    Source code(tar.gz)
    Source code(zip)
  • v5.11.1(Apr 27, 2020)

    Changes from v5.11.0:

    monorepo

    • Update dev dependencies.

    vega-hierarchy

    • Update tests for tape 5.0.

    vega-scenegraph

    • Use single quotes for generated aria-label captions. (Thanks @sprmn!)
    • Escape double quotes in SVG attributes, add test case.

    vega-statistics

    • Update tests for tape 5.0.

    vega-view-transforms

    • Update tests for tape 5.0.
    Source code(tar.gz)
    Source code(zip)
  • v5.11.0(Apr 27, 2020)

    Notable Additions

    • Preliminary support for ARIA accessibility attributes in SVG output. Mark and guide definitions now include automatically-generated roles and labels, which can be customized using description and aria properties. Individual mark items do not include ARIA attributes by default (which helps prevent bloat of both the scenegraph and output SVG), but these can be added using description and aria encoding channels.
    • Improve generated HTML form elements for signal bindings. Deployments that use custom CSS for styling bound elements may wish to make minor adjustments.
    • dayofyear time unit support for the timeunit transform.
    • dayofyear, week, utcdayofyear, and utcweek expression functions.
    • Axis domainCap, gridCap, and tickCap properties.

    Changelog

    Changes from v5.10.1:

    monorepo

    • Add ARIA attribute generation documentation.
    • Update eslint setup, consolidate configuration.
    • Update dev dependencies.

    vega

    • Add calendar test specification.
    • Add overview-detail-bins test spec to test suite.
    • Update crossfilter test scenes to include description property output.

    vega-encode

    • Move internal tick, label utilities to vega-scale.
    • Fix valid tick check calculation. (#2531)

    vega-functions

    • Add dayofyear, week, utcdayofyear, utcweek expression functions.

    vega-geo

    • Fix density utility size input checking bug.

    vega-parser

    • Add ARIA attribute generation for marks and guides via aria and description properties.
    • Add backing scale names to axis, legend datum objects.
    • Add zindex support for guide config.
    • Add axis domainCap, gridCap, and tickCap properties. (Thanks @kanitw!)

    vega-scale

    • Add tick, label guide utilities from vega-encode.
    • Add domainCaption utility.
    • Fix overflow with large domain and small tickMinStep (#2550, thanks @rwoollen!)

    vega-scenegraph

    • Add ARIA attribute generation to SVG renderers:
      • Parent <g> tags for mark items include automatic role and aria-roleDescription attributes.
      • Parent <g> tags for axes and legends include automatic aria-label captions.
      • Attribute generation for mark and guide definitions can be customized using the aria and description properties. If aria is false, the content is hidden from the accessibility tree by setting aria-hidden SVG attribute. The description property determines the aria-label SVG attribute.
      • Individual mark items do not include ARIA attributes by default, but these can be added using the encoding channels aria and description. If a description is provided and aria !== false, then Vega will generate accompanying role and aria-roledescription attributes for a mark item.
    • Provide experimental ariaRole and ariaRoleDescription encoding channels for individual marks, which override the default role and aria-roledescription attributes generated by Vega. However, note that these are experimental features and so may change at a later date.

    vega-schema

    • Add ARIA accessibility properties to mark, guide, and encode schemas.
    • Add axis domainCap, gridCap, and tickCap properties.

    vega-time

    • Add dayofyear time unit support and corresponding tests.
    • Add dayofyear, week, utcdayofyear, utcweek utility functions.
    • Add export for TIME_UNITS array of valid time unit strings.

    vega-transforms

    • Update TimeUnit transform parameter schema to enforce valid time unit strings.

    vega-typings

    • Add ARIA accessibility properties to mark, guide, and encode typings.
    • Add dayofyear option to TimeUnit transform typings.
    • Add zindex support for guide config.
    • Add axis domainCap, gridCap, and tickCap properties.

    vega-view

    • Improved semantic HTML for generated signal bindings to form input elements.
    Source code(tar.gz)
    Source code(zip)
  • v5.10.1(Mar 30, 2020)

    Changes from v5.10.0:

    vega-encode

    • Update default guide label format to support multi-line arrays. (#2456)

    vega-loader

    • Use startsWith rather than indexOf for string prefix checks.

    vega-parser

    • Use startsWith rather than indexOf for string prefix checks.
    • Set default fill and size for trail mark config.

    vega-transforms

    • Fix window operator init state for prev_value and next_value. (#2475.)

    vega-typings

    • Update mark config for arc mark.

    vega-view-transforms

    • Fix Overlap transform to early exit when there are no items (#2449).
    Source code(tar.gz)
    Source code(zip)
  • v5.10.0(Mar 6, 2020)

    Notable Additions

    • The Vega parser now generates a built-in background signal which the view uses to set the background color. While not technically a breaking change (specs will still parse and evaluate successfully), existing specs that use a signal named "background" may not render the same as before, in which case a different signal name should be used.
    • Top-level properties (autosize, background, padding, width, height) accept signal references, such as {"signal": "<expr>"}, which map to a signal definition's update property. If the top-level signals array contains an entry that matches one of these properties, the definitions will be merged, with precedence given to the properties defined in the signals array.
    • Vega views now include ARIA attributes on the view container DOM element. The role attribute is set to "figure", and the aria-label attribute is set to the specification description property.
    • The aggregate and window transforms support the product operation to multiply values.
    • The config supports a top-level lineBreak option for setting a global default for text line breaks. This property should be a string or regexp value, or a corresponding signal reference.
    • Support for text baseline values line-top and line-bottom. These values are similar to top and bottom baselines, but calculated relative to the lineHeight rather than fontSize alone.
    • Support for color blend modes via the new blend encoding channel. The allowed values are: multiply, screen, overlay, darken, lighten, color-dodge, color-burn, hard-light, soft-light, difference, exclusion, hue, saturation, color, luminosity. For Canvas rendering, the blend is set via the context 2D globalCompositeOperation property. For SVG rendering, the blend is set via the CSS mix-blend-mode style. The default Vega value is null (or undefined), which maps to the default values "source-over" (for Canvas) and "normal" (for SVG). For more, see the Canvas globalCompositeOperation and CSS mix-blend-mode documentation, including limitations in cross-browser support.
    • Support for configuration of cross-origin image handling. Vega uses crossOrigin="anonymous" by default for loaded images, which allows images loaded from a different host to be included in exported visualization images (and thereby avoid "tainted canvas errors"), so long as the server provides permission via proper CORS headers. This default can be overridden by providing loader options to the Vega view that include a crossOrigin property. If this property is defined and maps to a value of null or undefined, then a no-cors fetch will be performed instead.
    • Add axis labelOffset property to adjust axis label position in addition to tickOffset, and labelLineHeight to set the line height for multi-line axis labels.

    Changelog

    Changes from v5.9.2:

    docs

    • Add description entries to all specifications in the example gallery.
    • Update documentation for all new features.

    vega

    • Update test specifications to avoid use of signals named "background".

    vega-loader

    • Add crossOrigin URI sanitization configuration for images. (#2238)

    vega-parser

    • Add built-in background signal to drive view background.
    • Add support for top-level properties to take signal-values.
    • Add application of lineBreak config option to text marks. (#2370)
    • Add axis labelOffset property. (thanks @kanitw! #2317)
    • Add axis labelLineHeight property. (thanks @kanitw! #2437)
    • Add description support to parser output and config.

    vega-scenegraph

    • Add crossOrigin image handling support. (#2238)
    • Add blend encoding channel support. (#2311)
    • Add line-top, line-bottom text baseline options. (#2395)
    • Add text trimming to ensure consistent output. (#2418)
    • Fix linear gradient to use normalized bounding box coordinates. (#2365)
    • Fix canvas damage/redraw: Align to base pixel grid in case of non-integer scaling. (#2425)

    vega-schema

    • Add blend encoding to schema.
    • Add line-top, line-bottom text baseline options. (#2395)
    • Add top-level signal-valued properties to schema.
    • Add axis labelOffset and labelLineHeight properties to schema.

    vega-transforms

    • Add product aggregate operation. (#2307)

    vega-typings

    • Add blend encoding to typings.
    • Add line-top, line-bottom text baseline options. (#2395)
    • Add top-level signal-valued properties to typings.
    • Add lineBreak config typing. (#2370)
    • Add axis labelOffset and labelLineHeight typings.

    vega-util

    • Fix prototype pollution vulnerability.

    vega-view

    • Add ARIA attributes and View description method.
    • Use background signal to control the view background color.
    • Update padding method to handle numeric values.

    vega-view-transforms

    • Fix axis title layout bounds to avoid improper padding offset. (#2368)
    • Fix view layout resize code to avoid invocation of padding until needed.
    Source code(tar.gz)
    Source code(zip)
  • v5.9.2(Feb 28, 2020)

    Changes from v5.9.1:

    docs

    • Add clock, watch, and pacman examples. (Thanks @mathiastiberghien and @domoritz!)

    monorepo

    • Update dev dependencies.

    vega

    • Allow patch updates for Vega packages.
    • Add images-inline test specification.

    vega-loader

    • Fix URI sanitization to accept data: prefix URIs. (#2407)

    vega-parser

    • Fix legend columns value handling. (#2268)

    vega-scenegraph

    • Add memoization to speed up text width measurements. (Thanks @domoritz!)

    vega-schema

    • Fix date-type transform parameter support.

    vega-statistics

    • Fix exponential regression robustness, mean-center x-values. (#2378)

    vega-transforms

    • Fix TimeUnit maxbins, extent parameter support. (Thanks @haldenl!)

    vega-typings

    • Fix missing zindex mark encoding typing. (#2341)
    • Update typings. (Thanks @danmarshall, @domoritz, @kanitw!)

    vega-util

    • Add lruCache data structure, tests, and documentation.
    Source code(tar.gz)
    Source code(zip)
  • v5.9.1(Jan 14, 2020)

    Changes from v5.9.0:

    vega

    • Fix rollup script to resolve symlinks.

    vega-encode

    • Fix log scale legend values and format. (#2290)

    vega-projection-extended

    • Fix rollup script to resolve symlinks.

    vega-regression

    • Update vega-statistics dependency.

    vega-statistics

    • Fix r-squared calculation for poly and quad regression. (Thanks @jakevdp!)

    vega-time

    • Fix time floor step bug, add tests. (#2270)

    vega-util

    • Fix splitAccessPath escape handling, add tests. (#2287)
    Source code(tar.gz)
    Source code(zip)
  • v5.9.0(Dec 5, 2019)

    Notable Additions:

    • New Annual Precipitation example.
    • Signal bindings for select and radio input now support a labels array.
    • Group mark strokeOffset and strokeForeground properties to control rectangle rendering.
    • The default set of map projections now includes the mollweide projection.
    • Improved numerical robustness for regression methods.
    • Support translate and scale transformations in the isocontour transform.
    • Support for fully asynchronous data loading, via data async flag.
    • Support for adding new scale implementations at runtime.

    Changes from v5.8.1:

    docs

    vega

    • Add ES5 build support via Babel. (thanks @nyurik!)
    • Add isocontour-precipitation test specification. (thanks @mattijn!)
    • Update dynamic-url test specification to include async.
    • Update test scenegraphs in response to scale updates.

    vega-dataflow

    • Add asynchronous operator execution support.

    vega-encode

    • Fix legend item lookup bug.
    • Add spacing to legend range labels.

    vega-event-selector

    • Add initial TypeScript typings.

    vega-expression

    • Add initial TypeScript typings.

    vega-geo

    • Add isocontour scale and translate support. (#2163)

    vega-parser

    • Add async data loading property.

    vega-projection

    • Add mollweide projection to default set.
    • Update dependencies.

    vega-projection-extended

    • Add hyperElliptical, interruptedQuarticAuthalic, nicolosi projections.
    • Drop naturalEarth1, mollweide projections (move to vega-projection defaults).

    vega-scale

    • Refactor scale and metadata registration. (thanks @bmatcuk!)
    • Add initial TypeScript typings.
    • Update dependencies.

    vega-scenegraph

    • Add group mark strokeOffset property. (#2186)
    • Add group mark strokeForeground property. (#2197)
    • Fix group offset adjustment to interpolate smoothly.
    • Fix SVG renderer clip maintenance bug. (thanks @donghaoren!)
    • Fix boundContext to calculate tight bounds for Bezier curves.
    • Fix canvas renderer group gradient offset bug.

    vega-schema

    • Add signal bind labels to schema.
    • Add isocontour transform translate parameter to schema.
    • Add async data property to schema.
    • Add group mark strokeOffset to schema.

    vega-statistics

    • Fix regression methods for numerical stability.
    • Fix regression number coercion.

    vega-transforms

    • Add Load transform async parameter.
    • Fix to use infinite bin values outside extent bounds. (#2227)
    • Fix bin stop boundary error. (#2181)

    vega-typings

    • Add signal bind labels typings.
    • Add isocontour transform translate parameter typings.
    • Add async data property typing.
    • Add group mark strokeOffset typings.
    • Update config object typings.

    vega-util

    • Fix infinite loop bug in extent. (#2177, thanks @tuner!)
    • Fix null result case output for extentIndex.
    • Add tests for extent and extentIndex.

    vega-view

    • Add labels property for radio/select bindings.

    vega-wordcloud

    • Fix fontSize flooring to handle floating point error.
    Source code(tar.gz)
    Source code(zip)
  • v5.8.1(Nov 18, 2019)

Owner
Vega
Data Visualization Languages & Tools
Vega
A visualization grammar. Moved to: https://github.com/vega/vega

Vega: A Visualization Grammar Vega is a visualization grammar, a declarative format for creating and saving interactive visualization designs. With Ve

Trifacta Inc. 29 Dec 30, 2022
An open-source visualization library specialized for authoring charts that facilitate data storytelling with a high-level action-driven grammar.

Narrative Chart Introduction Narrative Chart is an open-source visualization library specialized for authoring charts that facilitate data storytellin

Narrative Chart 45 Nov 2, 2022
Apache ECharts is a powerful, interactive charting and data visualization library for browser

Apache ECharts Apache ECharts is a free, powerful charting and visualization library offering an easy way of adding intuitive, interactive, and highly

The Apache Software Foundation 53.8k Jan 9, 2023
Data Visualization Components

react-vis | Demos | Docs A COMPOSABLE VISUALIZATION SYSTEM Overview A collection of react components to render common data visualization charts, such

Uber Open Source 8.4k Jan 2, 2023
Cubism.js: A JavaScript library for time series visualization.

Cubism.js Cubism.js is a D3 plugin for visualizing time series. Use Cubism to construct better realtime dashboards, pulling data from Graphite, Cube a

Square 4.9k Jan 3, 2023
A general purpose, real-time visualization library.

Epoch By Ryan Sandor Richards Epoch is a general purpose charting library for application developers and visualization designers. It focuses on two di

Epoch 5k Dec 30, 2022
A port of the Processing visualization language to JavaScript.

⚠️ This project has been archived ⚠️ With the development of p5js and the API advances in Processing itself, as well as Processing.js itself having be

Processing.js 3.1k Jan 4, 2023
a graph visualization library using web workers and jQuery

arbor.js -------- Arbor is a graph visualization library built with web workers and jQuery. Rather than trying to be an all-encompassing framework, a

Christian Swinehart 2.6k Dec 19, 2022
Dynamic HTML5 visualization

Envision.js Fast interactive HTML5 charts. http://groups.google.com/group/envisionjs/ Features Modern Browsers, IE 6+ Mobile / Touch Support Pre-built

HumbleSoftware 1.6k Dec 3, 2022
vizflow is an ES6 interactive visualization engine

Vizflow vizflow.js - a render-loop library written using EcmaScript.6 (ES6) with no other external dependencies. Vizflow is a relatively small library

Vizflow 332 Oct 27, 2022
Data visualization library for depicting quantities as animated liquid blobs

liquidity.js A data visualization library for depicting quantities as animated liquid blobs. For a demonstration of what the final product can look li

N Halloran 91 Sep 20, 2022
Powerful data visualization library based on G2 and React.

BizCharts New charting and visualization library has been released: http://bizcharts.net/products/bizCharts. More details about BizCharts Features Rea

Alibaba 6k Jan 3, 2023
🍞📊 Beautiful chart for data visualization.

?? ?? Spread your data on TOAST UI Chart. TOAST UI Chart is Beautiful Statistical Data Visualization library. ?? Packages The functionality of TOAST U

NHN 5.2k Jan 2, 2023
A data visualization framework combining React & D3

Semiotic is a data visualization framework combining React & D3 Interactive Documentation API Docs on the wiki Examples Installation npm i semiotic E

nteract 2.3k Dec 29, 2022
🌏 A Declarative 3D Globe Data Visualization Library built with Three.js

Gio.js English | 中文 React Version: react-giojs Wechat minigame: wechat usage Gio.js is an open source library for web 3D globe data visualization buil

syt123450 1.6k Dec 29, 2022
A React toolkit for graph visualization based on G6

Graphin A React toolkit for graph analysis based on G6 English | 简体中文 ✨ Features ?? Good-looking elements, standardized style configuration Graphin st

AntV team 823 Jan 7, 2023
📊 Data visualization library for React based on D3

Data visualization library for React based on D3js REAVIZ is a modular chart component library that leverages React natively for rendering the compone

REAVIZ 740 Dec 31, 2022
A library for visualization and creative-coding

Pts Pts is a typescript/javascript library for visualization and creative-coding. Get started at ptsjs.org. Please give it a try, file issues, and sen

William Ngan 4.9k Jan 3, 2023
Location Intelligence & Data Visualization tool

What is CARTO? CARTO is an open, powerful, and intuitive platform for discovering and predicting the key insights underlying the location data in our

CARTO 2.6k Dec 31, 2022