Vizzu is a free, open-source Javascript/C++ library for animated data visualizations and data stories.

Vizzu

Library for animated data visualizations and data stories.

Tutorial & Examples · Reference · Repository

install size

About The Project

Vizzu is a free, open-source Javascript/C++ library utilizing a generic dataviz engine that generates many types of charts and seamlessly animates between them. It can be used to create static charts but more importantly it is designed for building animated data stories and interactive explorers as Vizzu enables showing different perspectives of the data that the viewers can easily follow due to the animation.

Main features:

  • Designed with animation in focus;
  • Defaults based on data visualization guidelines;
  • Automatic data aggregation & data filtering;
  • HTML5 canvas rendering;
  • Written in C++ compiled to WebAssembly;
  • Dependency-free.

Installation

Install via npm:

npm install vizzu

Or use it from CDN:

import Vizzu from 'https://cdn.jsdelivr.net/npm/[email protected]/dist/vizzu.min.js'; ">
<script type="module">
import Vizzu from 'https://cdn.jsdelivr.net/npm/[email protected]/dist/vizzu.min.js';
script>

Usage

Create a placeholder element that will contain the rendered chart:

">
<div id="myVizzu" style="width:800px; height:480px;">div>

Create a simple bar chart:

import Vizzu from 'https://cdn.jsdelivr.net/npm/[email protected]/dist/vizzu.min.js';

let data = {
  series: [
    { name: 'Foo', values: ['Alice', 'Bob', 'Ted'] },
    { name: 'Bar', values: [15, 32, 12] },
    { name: 'Baz', values: [5, 3, 2] }
  ]
};

let chart = new Vizzu('myVizzu', { data });
chart.animate({
  x: 'Foo',
  y: 'Bar'
});

Then turn it into a scatter plot:

chart.animate({
  color: 'Foo',
  x: 'Baz', 
  geometry: 'circle' 
});

Try it!

Example chart

Contributing

We welcome contributions to the project, visit our Contributing page for further info.

Contact

License

Copyright © 2021 Vizzu Kft..

Released under the Apache 2.0 License.

Comments
  • Problems with loading the Web Assembly module when using code bundlers (Vite, Webpack)

    Problems with loading the Web Assembly module when using code bundlers (Vite, Webpack)

    I'm playing around in a react project created with create-react-app (which uses webpack for bundling) and between how Vizzu is trying to locate its WASM and how webpack bundles it, I can't figure out an elegant way to get it to work.

    I realize this is not an issue with Vizzu per se, but wanted to highlight it, as it will be important for the adoption.

    Details as I understand them right now. The vizzu js module tries to import its own wasm module based on its own import path. image

    In my case this resolves to http://localhost:3000/node_modules/vizzu/dist/cvizzu.wasm image

    This file path is not recognized by the local dev server (as it only bundles .js/.ts files by default) Since the path is not recognized it serves the main webpage I'm trying to develop to test the module. image

    The wasm parser naturally fails to parse this and I get an empty page. image

    I know that there is a way to update the webpack config in order to serve the wasm file on this exact path, which is a half-decent solution but I don't (yet) know how to do it. I'll add details here once I have them

  • How do we skip displaying values on the X axis?

    How do we skip displaying values on the X axis?

    Hi,

    my X axis contains more than 700 values (dates), which overlaps and looks like a big gray box.

    image

    How do I skip values, or override how this is displayed?

    thanks

  • could not allocate memory, after many components using Vizzu have been loaded/reloaded

    could not allocate memory, after many components using Vizzu have been loaded/reloaded

    vizzu.min.js:19 Uncaught RangeError: WebAssembly.Memory(): could not allocate memory at eval (vizzu.min.js:19:1) at new Vizzu (vizzu.min.js:19:1) at eval (ShareOfChart.js:158:1) at invokePassiveEffectCreate (react-dom.development.js:23487:1) at HTMLUnknownElement.callCallback (react-dom.development.js:3945:1) at Object.invokeGuardedCallbackDev (react-dom.development.js:3994:1) at invokeGuardedCallback (react-dom.development.js:4056:1) at flushPassiveEffectsImpl (react-dom.development.js:23574:1) at unstable_runWithPriority (scheduler.development.js:468:1) at runWithPriority$1 (react-dom.development.js:11276:1)

  • Example code in logo animation

    Example code in logo animation

    Hi all!

    Awesome project! I'm looking for the example code which made the logo gif. Is it shareable?

    Atm i'm trying to concat the animations from 1 -> 2 in examples wihout success

    https://lib.vizzuhq.com/0.3.0/#example-1.1.0 image

    https://lib.vizzuhq.com/0.3.0/#example-1.1.1 image

    can anyone guide/help me? https://jsfiddle.net/crashlaker/7L3yg1bk/

    regards, C.

    ps: perhaps we could only do this with the same dataset

  • Types for colorPalette seem wrong

    Types for colorPalette seem wrong

    The types for color palettes are a little odd.

    type Color = `#${number}`
    	|`rgb(${number},${number},${number})`
    	|`rgba(${number},${number},${number},${number})`;
    
    type ColorPalette = Color 
    	| `${Color} ${Color}` 
    	| `${Color} ${Color} ${Color}`
    	| `${Color} ${Color} ${Color} ${Color}`
    	| `${Color} ${Color} ${Color} ${Color} ${Color}`;
    

    This makes sense, but in the docs, and in many CSS hex codes, they aren't just numbers.

    In the docs, the examples give #9355e8FF #123456FF #BDAF10FF as a valid option, but this throws a TS error because there are numbers and letters.

    Changing the color template string to #1 #11 #1 fixes the TS error, but is not actually valid.

    Possible Solution

    type Color = `#${number | string}`
    	|`rgb(${number},${number},${number})`
    	|`rgba(${number},${number},${number},${number})`;
    

    This solves my use case, but I'm not sure if there was some logic around needing to be a number?

  • Most basic interaction example

    Most basic interaction example

    Is there an example of user interaction, i.e. I click a button, chart gets updated (for example with a different filter value)? I assume this could be achieved by registering a handler via chart.on() but the tutorial does not seem to have an example of this.

  • Uncaught TypeError: this.tooltip is undefined

    Uncaught TypeError: this.tooltip is undefined

    Perhaps I am doing something silly, but trying to recreate the tutorial line by line, I get this error when trying to add a tooltip.

    code
    import Vizzu from "https://cdn.jsdelivr.net/npm/[email protected]/dist/vizzu.min.js";
    
    let data = {
      series: [
      {
        name: 'Genres',
        type: 'dimension',
        values: [
        'Pop', 'Rock', 'Jazz', 'Metal',
        'Pop', 'Rock', 'Jazz', 'Metal',
        'Pop', 'Rock', 'Jazz', 'Metal'
        ]
      },
      {
        name: 'Types',
        type: 'dimension',
        values: [
        'Hard', 'Hard', 'Hard', 'Hard',
        'Smooth', 'Smooth', 'Smooth', 'Smooth',
        'Experimental', 'Experimental', 'Experimental', 'Experimental'
        ]
      },
      {
        name: 'Popularity',
        type: 'measure',
        values: [ 114, 96, 78, 52, 56, 36, 174, 121, 127, 83, 94, 58 ]
      }
      ]
    };
    
    let chart = new Vizzu('vizzu-tooltip')
    
    chart.animate({ data });
    
    chart.animate({
      config: {
        channels: {
          x: { set: ['Genres'] },
          y: { set: ['Popularity'] }
        }
      }
    })
    
    chart.feature('tooltip',true)
    

    I am on [email protected], using npm live-server.

  • Numbers on label run to zero on removal

    Numbers on label run to zero on removal

    Upon removing a series from label, the numbers run to zero while fading out. See below gif labelrundown

    Is this intended? My expectation would be a simple fadeout.

  • Vizzu overwrites config object

    Vizzu overwrites config object

    This is a strange one, I'm not even sure it's a bug or just unexpected for me.

    In my WIP application, I'm keeping track of the config object I'm passing to Vizzu because I use it to render pieces of the UI. This state object extends the AppState interface from the below definition:

    import { Data, Config } from "vizzu/dist/vizzu";
    type FullConfig = NoOptional<Config.Chart>;
    interface AppState {
      chartConfig: FullConfig;
      dataset: Data.TableBySeries;
    }  
    

    in my app I pass this to Vizzu every single time it gets modified by my app

    // whenever state.chartConfig is changed by the app
    chart.animate({
      config: state.chartConfig,
    });  
    

    in another place I attempt to render UI elements based on the state object, and so I loop through the key-value pairs of state.chartConfig.channels. a simplified snippet for this would be e.g.:

    const colorSeries = state.chartConfig.channels.color
    colorSeries.map(series => // render the ui)  
    

    However, after the first UI change, I get the following error:

    TypeError: selected.map is not a function
    

    Looking at my state object, it's because the channels no longer hold string arrays, they have been replaced by objects image

    I believe this is done because JavaScript passes objects by reference and not by value, so this line in the lib mutates my original object, instead of creating a copy for its own internal use.

    This can be solved in two places in my view.

    1. Either the lib takes a deep copy of the config object before mutating it
    2. I pass a deep copy to the animate method instead of the actual object

    I think option 1 would give the better developer experience.

  • 1st README example does not pass TypeScript compiler

    1st README example does not pass TypeScript compiler

    In the first example, the series of Foo, Bar and Baz fails to compile for TS.

    Here is a screenshot of the error after copy / pasting.

    Screen Shot 2021-10-17 at 1 00 43 AM

    It's complaining that type is required on each entry, but is not present in the example.

    I am not sure if the following is correct, but it passes TS

    import Vizzu, { AnimTarget } from 'vizzu'
    
    let data: AnimTarget['data'] = {
        series: [
          { name: 'Foo', values: ['Alice', 'Bob', 'Ted'], type: 'dimension' },
          { name: 'Bar', values: [15, 32, 12], type: 'measure' },
          { name: 'Baz', values: [5, 3, 2], type: 'measure' }
        ]
      }
    
    let chart = new Vizzu('myVizzu', { data })
    

    If type is not actually required, perhaps make it so in the types. If it is, could you add it to the example?

  • TypeScript types not configured correctly

    TypeScript types not configured correctly

    In the distributed package.json, the key for TS types is missing, thus leading to TS complaining it cannot find them.

    // package.json
    {
      "name": "vizzu",
       ...
      "types": "dist/vizzu.d.ts",
      ... 
    }
    

    They are being included, but not referenced. Doing the above in my node_modules directory solved the issue

  • Legend / Area Charts in reverse directions

    Legend / Area Charts in reverse directions

    Legend and Geometry: Area charts work in reverse of each other as shown in the attached image.

    Screen Shot 2022-07-13 at 11 26 15 AM

    I attempted to remedy this with configurations (reverse, orientation, rotate, etc.), but none seemed to solve with desirable outcome. It would be nice if this directionality was corrected by default, or a configuration to reverse the order in the Y Axis.

  • Contributing: restructure guides

    Contributing: restructure guides

    • use the project wiki page for only general information, for example roadmap
    • link wiki page in every project's contributing guide and use a project specific contributing.md
A minimal Direct3D 12 example that draws an animated triangle, written entirely in C-style C++, and all taking place inside a single function.
A minimal Direct3D 12 example that draws an animated triangle, written entirely in C-style C++, and all taking place inside a single function.

A minimal Direct3D 12 example that draws an animated triangle, written entirely in C-style C++, and all taking place inside a single function.

May 3, 2022
A completely free, open-source, 2D game engine built on proven torque technology.
A completely free, open-source, 2D game engine built on proven torque technology.

Torque2D 4.0 Early Access 1 MIT Licensed Open Source version of Torque2D from GarageGames. Maintained by the Torque Game Engines team and contribution

Jan 9, 2023
A library in Javascript to create graphs in the browser similar to Unreal Blueprints.
A library in Javascript to create graphs in the browser similar to Unreal Blueprints.

A graph node engine and editor written in Javascript similar to PD or UDK Blueprints, comes with its own editor in HTML5 Canvas2D. The engine can run client side or server side using Node. It allows to export graphs as JSONs to be included in applications independently.

Jan 3, 2023
A set of open c++ game development tools that are lightweight, easy-to-integrate and free to use. Currently hosting a magicavoxel .vox full scene loader.
A set of open c++ game development tools that are lightweight, easy-to-integrate and free to use. Currently hosting a magicavoxel .vox full scene loader.

open game tools Open game tools is a set of unencumbered, free, lightweight, easy-to-integrate tools for use in game development. So far it contains:

Dec 29, 2022
StereoKit is an easy-to-use open source mixed reality library for building HoloLens and VR applications with C# and OpenXR!
StereoKit is an easy-to-use open source mixed reality library for building HoloLens and VR applications with C# and OpenXR!

StereoKit is an easy-to-use open source mixed reality library for building HoloLens and VR applications with C# and OpenXR! Inspired by libraries like XNA and Processing, StereoKit is meant to be fun to use and easy to develop with, yet still quite capable of creating professional and business ready software.

Jan 4, 2023
Alpha Plot is a free application for Scientific Data Analysis and Visualization for Windows, Linux and Mac OS X
Alpha Plot is a free application for Scientific Data Analysis and Visualization for Windows, Linux and Mac OS X

Alpha Plot is a free application for Scientific Data Analysis and Visualization for Windows, Linux and Mac OS X (probably BSD also). Web Link Website

Dec 26, 2022
OpenCorr is an open source C++ library for development of 2D, 3D/stereo, and volumetric digital image correlation
OpenCorr is an open source C++ library for development of 2D, 3D/stereo, and volumetric digital image correlation

OpenCorr OpenCorr is an open source C++ library for development of 2D, 3D/stereo, and volumetric digital image correlation. It aims to provide a devel

Jan 6, 2023
Open source Altium Database Library with over 147,000 high quality components and full 3d models.
Open source Altium Database Library with over 147,000 high quality components and full 3d models.

Open source Altium Database Library with over 147,000 high quality components and full 3d models.

Dec 29, 2022
An Open-Source subdivision surface library.

OpenSubdiv OpenSubdiv is a set of open source libraries that implement high performance subdivision surface (subdiv) evaluation on massively parallel

Jan 2, 2023
The official Open-Asset-Importer-Library Repository. Loads 40+ 3D-file-formats into one unified and clean data structure.

Open Asset Import Library (assimp) A library to import and export various 3d-model-formats including scene-post-processing to generate missing render

Jan 4, 2023
Open 3D Engine (O3DE) is an Apache 2.0-licensed multi-platform AAA Open 3D Engine
Open 3D Engine (O3DE) is an Apache 2.0-licensed multi-platform AAA Open 3D Engine

Open 3D Engine (O3DE) is an Apache 2.0-licensed multi-platform 3D engine that enables developers and content creators to build AAA games, cinema-quality 3D worlds, and high-fidelity simulations without any fees or commercial obligations.

Jan 7, 2023
appleseed is an open source, physically-based global illumination rendering engine primarily designed for animation and visual effects.
appleseed is an open source, physically-based global illumination rendering engine primarily designed for animation and visual effects.

appleseed is an open source, physically-based global illumination rendering engine primarily designed for animation and visual effects.

Jan 8, 2023
An open-source implementation of Autodesk's FBX

SmallFBX An open-source implementation of Autodesk's FBX that is capable of import & export mesh, blend shape, skin, and animations. Mainly intended t

Dec 21, 2022
The open-source tool for creating of 3D models
The open-source tool for creating of 3D models

The open-source tool for creating of 3D models

Dec 21, 2022
Cocos2d-x is a suite of open-source, cross-platform, game-development tools used by millions of developers all over the world.
Cocos2d-x is a suite of open-source, cross-platform, game-development tools used by millions of developers all over the world.

Cocos2d-x is a suite of open-source, cross-platform, game-development tools used by millions of developers all over the world.

Dec 26, 2022
Tesseract Open Source OCR Engine (main repository)

Tesseract OCR Table of Contents Tesseract OCR About Brief history Installing Tesseract Running Tesseract For developers Support License Dependencies L

Jan 2, 2023
Open-Source Vulkan C++ API

Vulkan-Hpp: C++ Bindings for Vulkan The goal of the Vulkan-Hpp is to provide header only C++ bindings for the Vulkan C API to improve the developers V

Jan 8, 2023
ZBar Bar Code Reader is an open source software suite for reading bar codes from various sources

ZBar Bar Code Reader is an open source software suite for reading bar codes from various sources

Dec 26, 2022
Open-source, cross-platform, C++ game engine for creating 2D/3D games.

GamePlay v3.0.0 GamePlay is an open-source, cross-platform, C++ game framework/engine for creating 2D/3D mobile and desktop games. Website Wiki API De

Jan 2, 2023