GithubHelp home page GithubHelp logo

chartshq / muze Goto Github PK

View Code? Open in Web Editor NEW
1.2K 28.0 43.0 88.79 MB

Composable data visualisation library for web with a data-first approach now powered by WebAssembly

Home Page: https://muzejs.org/

License: Other

data-visualization visualization charts javascript data-viz data web barchart linechart area-chart

muze's Introduction




Free License NPM version Contributors

What is Muze?

Muze is a free data visualization library for creating exploratory data visualizations (like Tableau) in browser, using WebAssembly. It uses a layered Grammar of Graphics (GoG) to create composable and interactive data visualization for web. It is ideal for use in visual analytics dashboards & applications to create highly performant, interactive, multi-dimensional, and composable visualizations.

It uses a data-first approach to define the constructs and layers of the chart, automatically generates cross-chart interactivity, and allows you to over-ride any behavior or interaction on the chart.

Muze uses an in-browser DataModel to store and transform data, and control the behaviour of every component in the visualization, thereby enabling creating of complex and cross-connected charts.

Features

  • ๐Ÿ— Build complex and interactive visualizations by using composable layer constructs.

  • ๐Ÿ”จ Use rich data operators to transform, visualize and interact with data.

  • ๐Ÿ‘ฏ Define custom interactions by configuring physical behavioural model and side effect.

  • โœ‚๏ธ Use css to change look and feel of the charts.

  • โ˜€๏ธ Have a single source of truth for all your visualization and interaction controlled from data.

  • ๐Ÿ”ฉ Integrate easily with your existing application by dispatching actions on demand.

  • ๐Ÿš€ Uses WebAssembly for handling huge datasets and for better performance.

Installation

CDN

Insert the muze build and the required CSS into the <head>:

<link href="https://cdn.jsdelivr.net/npm/@chartshq/[email protected]/dist/muze.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/@chartshq/[email protected]/dist/muze.js" type="text/javascript"></script>

NPM

Install muze from NPM:

$ npm install @chartshq/muze

Then you need to add a webpack plugin copy-webpack-plugin to copy some required muze files to your output dist or build folder.

npm install [email protected] --save-dev

And then within your webpack configuration object, you'll need to add the copy-webpack-plugin to the list of plugins, like so:

const path = require("path");
const CopyWebpackPlugin = require('copy-webpack-plugin');

module.exports = {
  plugins: [
    new CopyWebpackPlugin([
      {
        // Provide your node_modules path where @chartshq/muze
        // package is installed.
        from: path.resolve("<your_node_modules_path>", "@chartshq/muze/dist"),
        to: '.'
      },
    ]),
  ]
}

You also can checkout our muze-app-template to try out the Muze quickly through a boilerplate app.

Getting Started

Once the installation is done, please follow the steps below:

  1. Prepare the data and the corresponding schema:
// Prepare the schema for data.
const schema = [
  {
    name: 'Name',
    type: 'dimension'
  },
  {
    name: 'Maker',
    type: 'dimension'
  },
  {
    name: 'Horsepower',
    type: 'measure',
    defAggFn: 'avg'
  },
  {
    name: 'Origin',
    type: 'dimension'
  }
]

// Prepare the data.
const data = [
   {
    "Name": "chevrolet chevelle malibu",
    "Maker": "chevrolet",
    "Horsepower": 130,
    "Origin": "USA"
  },
  {
    "Name": "buick skylark 320",
    "Maker": "buick",
    "Horsepower": 165,
    "Origin": "USA"
  },
  {
    "Name": "datsun pl510",
    "Maker": "datsun",
    "Horsepower": 88,
    "Origin": "Japan"
  }
]
  1. Import muze as follows:

If you are using the npm package, import the package and its CSS file.

import muze from '@chartshq/muze';
import "@chartshq/muze/dist/muze.css";

If you are using CDN, use it as follows:

const muze = window.muze;
  1. Create a DataModel and a basic chart:
// As the muze and DataModel are asynchronous, so we need to
// use async-await syntax.
async function myAsyncFn() {
  // Load the DataModel module.
  const DataModel = await muze.DataModel.onReady();
  
  // Converts the raw data into a format
  // which DataModel can consume.
  const formattedData = await DataModel.loadData(data, schema);

  // Create a new DataModel instance with
  // the formatted data.
  let dm = new DataModel(formattedData);
  
  // Create a global environment to share common configs across charts.
  const env = await muze();
 
  // Create a new canvas instance from the global
  // environment to render chart on.
  const canvas = env.canvas();

  canvas
  .data(dm) // Set data to the chart.
  .rows(["Horsepower"]) // Fields drawn on Y axis.
  .columns(["Origin"]) // Fields drawn on X axis.
  .mount("#chart"); // Specify an element to mount on using a CSS selector.
}

myAsyncFn()
  .catch(console.error.bind(console));

Documentation

You can find detailed tutorials, concepts and API references at our Documentation.

What has changed?

Muze 2.0.0 is now powered by WebAssembly bringing in huge performance improvement over the previous versions. The JavaScript version has been deprecated and no active development will take place in that version - but we'll fix critical bugs as and when raised in GitHub.

This version of Muze brings in power of WebAssembly for handling large datasets with ease, along with frictionless interaction and rendering. In addition, the data loading part in WebAssembly version is asynchronous, as opposed to being synchronous in the JavaScript version. Further, the WebAssembly version is free but only available as a compiled binary, whereas the JavaScript version is free and open-source (MIT).

You can visit the deprecated JavaScript version here https://github.com/chartshq/muze-deprecated

Migrating from previous versions of Muze

Now the Muze became asynchronous as opposed to being synchronous in the previous JavaScript version.

Changed APIs

  • Creating Env

    Muze deprecated version:

    const env = muze();
    const canvas = env.canvas();

    Latest version:

    (async function () {
      const env = await muze();
      const canvas = env.canvas();
    })();
  • dispatchBehaviour

    Muze deprecated version:

    canvas.firebolt().dispatchBehaviour('highlight', {
      criteria: {
        Maker: ['ford']
      }
    });

    Latest version :

    In the current version, the identifiers needs to be passed in dimensions object or range object if it is measure or temporal field.

    // Dispatch highlight behaviour on data plots having maker as ford
    canvas.firebolt().dispatchBehaviour('highlight', {
      criteria: {
        dimensions: {
          Maker: ['ford']
        }
      }
    });
    
    // Dispatch highlight behaviour on data plots having Acceleration
    // between 20 and 50.
    canvas.firebolt().dispatchBehaviour('highlight', {
      criteria: {
        range: {
          Acceleration: [20, 50]
        }
      }
    });

Support

Please raise a Github issue here.

Roadmap

Please contribute to our public wishlist or upvote an existing feature at Muze Public Wishlist & Roadmap.

License

Custom License (Free to use)

muze's People

Contributors

adarshlilha avatar adotg avatar chartshq-eng avatar mridulmeh avatar ranajitbanerjee avatar rousan avatar sanjaymahto avatar ud-ud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

muze's Issues

Missing Documentation

Under cross interaction docs, you have mentioned that attached some illustration. But there is no such illustration and proper demo. Please attach proper demos and explanation for cross connected charts simply using data model

Also API for Muze is missing. So unable to understand ActionModel,sideEffects

Changing axis configuration on update does not work

Do you want to request a feature or report a bug?

  • bug

What is the current behavior?

  • Changing axis config on update doesn't work.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code. You can either a scale down sample, JSFiddle or JSBin link

  • Update canvas with new axis configuration.

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?

  • All

Sorting a groupedBy DataModel does not render in a chart

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Sorting a groupedBy DataModel does not work.
screenshot

Example

import _    from "underscore"
import m    from "moment"
import muze from "muze"

{ DataModel }     = muze
{ groupBy, sort } = DataModel.Operators

schema = [
	{
		name:     "total"
		type:     "measure"
		defAggFn: "avg"
	}
	{
		name:    "start"
		type:    "dimension"
		subtype: "temporal"
	}
	{
		name:    "day"
		type:    "dimension"
		subtype: "datetime"
		format:  "%d"
	}
]

data = [
	{ total: 5, start: m().subtract(1, "days") }
	{ total: 4, start: m().subtract(4, "days") }
	{ total: 9, start: m().subtract(1, "days") }
	{ total: 1, start: m().subtract(4, "days") }
	{ total: 8, start: m().subtract(3, "days") }
	{ total: 6, start: m().subtract(2, "days") }
	{ total: 2, start: m().subtract(3, "days") }
	{ total: 3, start: m().subtract(2, "days") }
]

data = _.map data, (d) ->
	_.extend {}, d,
		start: +d.start
		day:   m(d.start).format "DD"

# data = _.sortBy data, "day" # Sorting dataset here first gives expected result

groupFn = groupBy ["day"], total: "avg"
sortFn  = sort    [ "day", "ASC" ]

dm = new DataModel data, schema

dm = groupFn sortFn dm # Switching these around doesn't work either

canvas
	.data    dm
	.width   600
	.height  450
	.rows    [ "total" ]
	.columns [ "day" ]
	.mount   "#chart-container"

What is the expected behavior?
screenshot_deux

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?
1.0.3 Chrome

Also is it possible to use the DataModel to group by date range? It's vaguely mentioned in the docs but I couldn't find anything about it. Is adding a key like I do above the correct approach?
Cheers!

Hold multiple states as histories

Create histories for interactive navigation of multiple viz.

If a chart is created and on click of an element in the chart if another chart is rendered both specifications have to be saved in histories for navigation. Navigation happens with transitions.

History could be linear, tree (drill down) based on the derivation of the latter chart.

Consistencies

Issues related to consistencies from a functional persperctive.

Tooltip shows incorrect aggregation method name

Do you want to request a feature or report a bug?

  • bug

What is the current behavior?

  • Tooltip shows incorrect aggregation function name when datamodel is updated with a new aggregation method. Currently, it always takes the default aggregation method from the datamodel which is wrong

What is the expected behavior?

  • It should show the aggregation method which is currently applied in the chart's datamodel.

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?

  • All

Missing documentation (or functionality) on how to format dates on tooltips

Do you want to request a feature or report a bug?

feature

What is the current behavior?

Date objects always render only the year on tooltips and I can't find documentation on how to format it.

What is the expected behavior?

There should be a way to specify the render format of a date. Having only a few preset formats would be ok (like 2018, 21-Oct-2018, October 10 or 2018-09-12 23:17:10).

Maybe there is but I didn't find the documentation. If it exists, maybe it should be linked here: https://www.charts.com/muze/docs/api-dateformat

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?

I'm using 1.0.3

Thank you for making Muze! :)

LifecycleManager does not work on canvas update

Do you want to request a feature or report a bug?

  • bug

What is the current behavior?

  • After canvas update, calling canvas.once('canvas.drawn') or any other lifecycle event returns a resolved promise. Hence, there is currently no way to get notified about lifecycle events after any canvas update has happened.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code. You can either a scale down sample, JSFiddle or JSBin link

  • Update the canvas after the chart has been rendered once.
    canvas.rows(['Horsepower']);
    canvas.once('canvas.drawn').then(() => console.log('drawn') .

What is the expected behavior?

  • Lifecycle event should work on canvas update also.

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?

  • All

Null data handling

When null data is present in data in data

  • points should not take 0 value
  • result of aggregation should not return 0 value
  • legend should not convert it to zero value

Stacked Bar chart rendering instead of Grouped Bar chart

Do you want to request a feature or report a bug?

  • bug

What is the current behavior?
When the average of a measure is plotted against a dimension and colored by another dimension,
a stacked bar chart is rendered.
Ideally a grouped bar chart should be shown when the measure has defAggFn(aggregation function) set to 'average'.
image

What is the expected behavior?
Grouped bar chart should be rendered.

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?

  • latest

Show selected summary of all the visual units in crosstab

Currently, when selection is done in crosstab, it shows only the selected information of the visual unit currently interacted with. It should show the selected information of all the visual units where interaction was done. Also, all the plots interacted with should be highlighted.

Updating chart config with different rows does not update domain

Do you want to request a feature or report a bug?

  • Bug

What is the current behavior?
After plotting a dimension vs a measure, if I update the measure to use a different field the domain of the previous measure is used by the axis.
See the attached screen shots below.

Supplying Revenue field in colums array .columns(['Revenue'])
image

After updating the canvas to use expense field .columns(['Expense']) the domain of Revenue is used
even though the max value Expense much smaller.
image

What is the expected behavior?
When rows or columns config is updated the domain of the axis should also change.

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?

  • Latest version

Remove unnecessary methods from the code

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Currently, there are methods which are unnecessary.

  • in visual-encoder, the setCommonDomain is unnecessary

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code. You can either a scale down sample, JSFiddle or JSBin link

What is the expected behavior?
Remove the methods

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?
All versions

Dissociating physical actions and behaviours on one canvas dissociates them on other canvases

Do you want to request a feature or report a bug?

  • bug

What is the current behavior?

  • Dissociating behaviour and physical action on one canvas dissociates them on other canvases also.

What is the expected behavior?

  • Dissociation should happen on the registered canvas only.

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?

  • All versions.

Incorrect tooltips in certain conditions

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Incorrect tooltip and console errors when a dimension v/s measure chart is made along with multiple retinal encodings.

  • When a dimension is provided in size in the above case, the tooltip does not appear
  • When a measure is provided in size in the above case, the tooltip does appear without the color symbols
  • Draw a point chart instead of a bar chart with dimension vs measure to have a clearer understanding of the issue

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code. You can either a scale down sample, JSFiddle or JSBin link

https://jsfiddle.net/e40ndgab/1/

What is the expected behavior?

Correct tooltip and no console errors

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?
No it did not work earlier, affects all versions and browsers

Omissions in documentation

Do you want to request a feature or report a bug?

I think this is a bug

What is the current behavior?

There are few omissions in the documentation.
ommission

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code. You can either a scale down sample, JSFiddle or JSBin link

It is not related to the codebase - only documentation.

What is the expected behavior?

To include the missing information.

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?

Not applicable.

Tooltip with time series chart does not show correct date string

Issue Type bug

What is the current behavior?
When plotting a temporal field against a measure, if I hover or select a point the tooltip does
not show the correct date string. Please see attached screen shot.
image

If the datamodel specifies the date string as "18-04-2018" then the tooltip should show
the correct date not just "2018"

Using the latest version of muze.

Axis Tick Labels getting cut when providing tickValues/tickFormat for band axes

Do you want to request a feature or report a bug?

bug

What is the current behavior?

When tickValues/tickFormatting is provided for band axis, the first and/or last labels sometimes get cut when the width(for x-axis) and height(for y-axis) is lesser. Also, this happens prominently for a large set of dimensional values as can be seen below where there are 500 dimensional values:
screen shot 2018-10-22 at 3 35 55 pm

What is the expected behavior?

The labels at the beginning and end should not cut off in any scenario

Interactivity is slow when dataset is very large.

Do you want to request a feature or report a bug?

  • improvement

What is the current behavior?
When tested with a dataset with 7000 rows and 21 columns, interactivity is slow.
Hovering over a bar shows the tooltip after a delay of almost 1 second.
I can't share the dataset, but the behaviour is visible in this giph I created.

alt text

What is the expected behavior?
Can interaction be made faster with large datasets?

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?

  • latest

Uncaught TypeError: v is not a function on bar hover without any tooltip config

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Console.errors with Uncaught TypeError: v is not a function when you hover over a bar in a bar chart without any tooltip config.

What is the expected behavior?
No errors

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?
1.0.3 Chrome

Using tickFormat in axes configuration breaks rendering of temporal field

Do you want to request a feature or report a bug?

  • bug

What is the current behavior?
If the tick format config for axes is used to change the appearance of numeric fields, the
rendering of temporal fields breaks and shows the complete JS Date string.

Before changing tickFormat the temporal axis shows properly and the y-axis shows numbers as is.
image

After changing the tickFormat to render numbers as a local string (ex 10000 becomes 10,000) date time values are rendered as date strings.
image

The tickFormat configuration is as follows:
axes: {
x: {
tickFormat: (value) => {
if (typeof value === 'number') {
return new Intl.NumberFormat().format(value);
}
return value;
},
},
y: {
tickFormat: (value) => {
if (typeof value === 'number') {
return new Intl.NumberFormat().format(value);
}
return value;
},
},
},
You can see the behaviour in this fiddle.

https://jsfiddle.net/kv8g1q92/

What is the expected behavior?
Date strings should not be broken by specifying tick format.

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?

  • latest

Fix Animation

Fix animation of viz during layer update

  • Pie in www.charts.com/muze page when crosstab is clicked
  • /muze/examples/view/scatter-with-retinal-encoding-and-text-layer-xcx-kppjy when legend is clicked

Error when calling dispatchBehaviour manually

Do you want to request a feature or report a bug?
bug

What is the current behavior?
Error throwing when canvas.firebolt().dispatchBehaviour method is called.

What is the expected behavior?
Error should not be thrown

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?

1.0.3

Runtime Error on Initialising muze with empty datamodel

bug

Currently, on sending empty datamodel it's giving runtime error:

screenshot 2018-10-03 at 5 53 04 pm

Steps to Reproduce the error:
1.) Go to https://sanjaymahto.github.io/purchase-decision/
2.) Filter the chart by selecting Miles_per_Gallon as field, Equal to as Operation and 45.00 as value (Random Value).
3.) Click on filter
4.) Open browser console to view error

There should be an Empty section in the chart if it's not matching with any of the field values.
screenshot 2018-10-03 at 6 02 32 pm
In the above image Miles_per_Gallon row should be blank.

Re-*

Re-arch / re-design / re-think on the functionality

Forcing domain for a dual axes viz is not taken care of

For a dual axes viz, changing domain on one axis changes domain on another axis.
.config({ axes: { y: { domain: [0, 1000] }}})
Fix for multi faceted, multi split, dual axes viz has to be patched.

Provision for one common y axis specification gets applied to all the axes and then a specific config for each config. Axis could be referenced by the field attached to create the axis (if implementing this takes care of shared variable).

Promise.all([loadData('/static/cars.json'), loadData('/static/cars-schema.json')]).then(function (params) {
	const data = params[0];
	const schema = params[1];
    const node = document.getElementById('chart-container');

    const env = muze();
    const canvas = env.canvas();
    const DataModel = muze.DataModel;
    

    const simpleBar = {
        name: 'simplebar',
        mark: 'bar',
        encoding: {
            x: 'compositeBar.encoding.x',
            y: 'compositeBar.encoding.y',
        },
    };

    const simpleText = {
        name: 'simpletext',
        mark: 'text',
        encoding: {
            x: 'compositeBar.encoding.x',
            y: 'compositeBar.encoding.y',
            text: 'compositeBar.encoding.y'
        },
    };

    const simplePoint = {
        name: 'simplePoint',
        mark: 'point',
        encoding: {
            x: 'compositePoint.encoding.x',
            y: 'compositePoint.encoding.y',
            color: 'compositePoint.encoding.color'
        },
    };

    const simpleTick = {
        name: 'simpleTick',
        mark: 'tick',
        encoding: {
            x: 'compositePoint.encoding.x',
            y: 'compositePoint.encoding.y',
            color: 'compositePoint.encoding.color'
        }
    };

    const layerFactory = muze.layerFactory
    layerFactory.composeLayers('compositeBar', [simpleBar, simpleText])
    layerFactory.composeLayers('compositePoint', [simplePoint, simpleTick])
    
    const dataModelInstance = new DataModel(data, schema);

    canvas
        .data(dataModelInstance)
        .width(600)
        .height(400)
        .config({ axes: { y: { domain: [0, 1000] } } })
        .layers([{
            mark: 'compositeBar', /* For the primary Y axis */
            encoding: {
                y: 'Acceleration'
            }
        }, {
            mark: 'compositePoint',/* For the secondary Y axis */
            encoding: {
                y: 'Displacement',
                color: {
                    value: () => 'red' /* For differentiating layers */
                }
            }
        }])
        .rows([['Displacement'], ['Acceleration']])
        .columns(['Year'])
        .mount(node);
})

Spread Operator is not supported in build system

BUG

Spread Operator is not supported in production build

Write a code using spread operator and try to make a production build

Should not give error in production build

**Muze version: 1.0.3 **

Uncaught TypeError when passed empty array

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Uncaught TypeError: Cannot read property 'axisLabelDim' of null when passed empty array

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code. You can either a scale down sample, JSFiddle or JSBin link
https://jsfiddle.net/grmzvejL/

What is the expected behavior?
Renders empty chart

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?
Chrome - Muze 1.0.3

Crosstab visualization does not scroll when viewport is not large enough

Do you want to request a feature or report a bug?

  • bug

What is the current behavior?
When a crosstab is plotted with a small width and height, not all the cells are rendered.
The crosstab does not have a scrollbar to allow for viewing the cells that are not rendered.

What is the expected behavior?
The remaining cells should become visible when I scroll.

Throwing svg error when chart dimension is less

Do you want to request a feature or report a bug?

Report a bug

What is the current behavior?

Throwing error like <svg> attribute height: A negative value is not valid. ("-89"), when a small chart container is provided.

What is the expected behavior?

The library should hide some overflowed elements or provide a scrollbar.

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?

MuzeJS: v1.0.3
Browser: tested on chrome, firefox, and safari

screenshot 2018-10-22 at 1 28 46 pm 2

Throwing svg error when chart dimension is small

Do you want to request a feature or report a bug?

Report a bug

What is the current behavior?

Throwing error like <svg> attribute height: A negative value is not valid. ("-89"), when a small chart container is provided.

What is the expected behavior?

The library should hide some overflowed elements or provide a scrollbar.

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?

MuzeJS: v1.0.3
Browser: tested on chrome, firefox, and safari
screenshot 2018-10-22 at 1 28 46 pm 2

event.stopPropagation error while interacting with legend

Do you want to request a feature or report a bug?

  • Bug

What is the current behavior?
While hovering on legend, a js error is thrown - Cannot read property stopPropagation of null

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?

1.0.3

Incorrect pie charts with size field when defAggFn is not sum

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

When the defAggFn of a measure is not "sum", the size of pie charts rendered is very small/large and is not the desired behaviour. The legend also indicates discrepancy in this regard.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code. You can either a scale down sample, JSFiddle or JSBin link

https://jsfiddle.net/2m6o8huw/

What is the expected behavior?

The pie charts should be big enough, so that the value of the largest pie should fill the width. Refer to the legend to get the size of the pie, or change the defAggFn to check the ideal result.

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?
All versions are affected.

Add multiple pagination mechanisms in layout

Do you want to request a feature or report a bug?
Feature

What is the current behavior?
Pagination occurs via API, add different pagination mechanisms

What is the expected behavior?
Must have scroll as a default

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?
All

Merge state props and percolate store down to one component

Currently, VisualGroup, VisualUnit, VisualLayer has different stores. This design was done keeping standalone usability in mind.

Currently, all components should return the state props and a common store has to be percolated down the hierarchy

Legend header and body spacing not appropriate

When legend is positioned at bottom, the spacing between header and body is too large which makes the header of legend feel like a part of axis.

Config

canvas
    .data(dm)
    .width(600)
    .height(400)
    .rows(['Displacement'])
    .columns(['Horsepower'])
    .color('Origin')
    .detail(['Name'])
    .config({
        legend: {
            position: 'bottom'
        }
    })
    .mount(node) /* Attaching the canvas to DOM element */```

Increase performance when there are large number of facets

Do you want to request a feature or report a bug?

  • Improvement

What is the current behavior?

  • When there are large number of facets, the time taken for rendering is quite high. Creation of state store is taking time. Specifically, the append method of hyperdis is taking time.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code. You can either a scale down sample, JSFiddle or JSBin link

canvas.rows(['Maker', 'Horsepower']) .columns(['Cylinders', 'Acceleration']) .mount(mountPoint)

What is the expected behavior?

  • Less time should be taken for rendering.

Repeated column labels with incorrect widths in some cases

Do you want to request a feature or report a bug?
bug

What is the current behavior?
When multiple measures are provided in columns along with multiple facets:

  1. Last level facets get repeated
  2. The widths of facets in column are weird and/or less than width of axis

What is the expected behavior?
Last levels should not be repeated.
Widths of facets in column should confirm to the bottom matrix

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?
All versions

API

API enhancements, bug fixing, documentation, test cases

Broken link in introduction-to-datamodel docs

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
https://www.charts.com/muze/docs/introduction-to-datamodel#measure shows a broken link to https://www.charts.com/muze/api/datetime

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code. You can either a scale down sample, JSFiddle or JSBin link
Go to #measure, click link...

What is the expected behavior?
Link works

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?
Chrome

Simple number display and table on canvas.

Hello,

is it currently possible to render a simple number display for example to present a KPI?
If we take the car dataset imagine creating a dashboards with multiple visuals. I want to display a measure at the top with title "Cars with more than 50 Horsepower: 67". It would be nice if this box which just displays the number also allows interactivity so that when you click on the 67 all charts e.g. "Cars by Origin Barchart" now show only this subset.

Can I do that with a text layer? Similarly would this number display work in a pivot table like in the crosstab example: https://www.charts.com/muze/examples/view/microcharts-in-table-using-crosstab

I was able to remove the bars in each cell, but now I have no elements to click on. If that is not the case I would open the feature request in the feedback.

Thanks!

Tim

Add TypeScript Type Definition

Do you want to request a feature or report a bug?

Feature

What is the current behavior?

Doesn't include type definition file.

What is the expected behavior?

A TypeScript type definition file (*.d.ts) is present to aid developers who are using the library with TypeScript. It can also work as a proof of correctness.

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?

v1.0.3

Crosstab starts pagination way before than it should

If a crosstab is formed with 800x800 dimension and multiple variables are assigned to rows and columns then crosstab starts pagination way before than it should.

  • The pagination logic depends on minUnitHeight and minUnitWidth which is not required. Minimum unit height can be achieved from label calculation.
  • Check if pagination is needed at all. We can do scrolling. Can have scrolling config defined in canvas.
  • If scrolling is not chosen then labels overlapping is acceptable.

Different views of chart in chrome and firefox

Do you want to request a feature or report a bug?

  • bug

What is the current behavior?

  • In chrome full chart is showing but in firefox only a part of the chart is showing.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code. You can either a scale down sample, JSFiddle or JSBin link

What is the expected behavior?

  • Views should be same in all browsers

Which versions of MuzeJS, and which browser/OS are affected by this issue? Did this work in previous versions of MuzeJS?

  • All

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.