Coder Social home page Coder Social logo

hkang1 / hermes Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 2.0 6.4 MB

A lightweight canvas-based parallel coordinates chart library.

License: ISC License

JavaScript 1.84% TypeScript 98.16%
canvas data-visualization npm-package parallel-coordinates typescript

hermes's People

Contributors

hkang1 avatar trentwatt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

trentwatt mapmeld

hermes's Issues

add support for axis padding

  1. no padding, data lines up to the extreme ends
  2. some arbitrary pixel padding
  3. nearest nice number beyond data min/max

link the filter and axis interactive states together

Currently, hovering over filters won't change the axis to the hover state, and vice versus. Same with click events.

Connect the two so the visual styles can be connected, which makes more sense from a UX standpoint.

blurry rendering when devicePixelRatio > 1

@hkang1

you need to size the canvas width/height for physical pixels (also make sure to round those dimensions), and then set the css style to logical pixels. you'll also need to adjust the font size from logical to physical before setting it on the ctx.

so for a requested width of 1000 your canvas.style.width should be 1000 but canvas.width should be Math.round(1000 * devicePixelRatio).

you can verify if it works as expected by zooming the browser and refreshing (without adjusting dpi settings on your display)

image

add support for option to reverse axis scale

currently the vertical axis go from min to max from a top down layout, but the more common case is the reverse. Add support to default to the reverse layout and config option to be able to reverse it back when needed, on a per axis basis.

improve categorical scale filtering UX

Implementation notes

  • auto-segment the filters
  • auto scale the filter
  • to better support filter toggling
  • still support drag and resize but will auto segment them upon release
  • outline style for selectable filters (will have their own normal, hover and active states)

Key motivations

  • optimize experiment to easily toggle on and off filters
  • distinguish categorical scale from gradient scales (linear and log)

Downsides

  • clearing out all the selected categorical filters will be selecting all of the previously turned on filters (intuitively this is probably an edge case)

add support for tooltips

primarily for the truncated labels but possibly usable for other labels if needed in the future

for on-white theme, dark semi-transparent background with white text
can consider other styles for dark mode in the future

add support for reverse filter creation via dragging

The dragging of the axis to create a filter dynamically filters when the filter is created in a positive direction (top to bottom for horizontally configured chart, left to right for vertically configured chart), but not in the reverse direction.

throttled dimension dragging causes issue with reordering

The logic of when and where to shift the dragged dimension is not as responsive. The logic currently depends on an incremental change in positioning, which is really not guaranteed with throttled mousemove. Update to be able to accurately reflect the dragged dimension position regardless of where the mouse position is.

add support for charting Infinity, -Infinity and NaN

Approach:

  • detect if data contains Inf, -Inf and NaN
  • draw Inf marker on the top of the dimension axis
  • draw -Inf marker on the bottom of the dimension axis
  • draw NaN marker below the -Inf marker on the dimension axis
  • all or nothing approach for drawing Inf, -Inf, NaN markers, where if any of the dimensions has Inf/-Inf data, draw the Inf and -Inf markers on all of the dimension axes. Same with NaN, but it is possible to just have NaN or just Inf/-Inf axes.

add support for disabling and enabling chart interactions

To minimize performance issues with having a lot of charts with multiple event listeners, the first step is to add support for temporarily removing event listeners and adding them back later when needed. In the future, based on whether the chart is in visible viewport or not, the chart can dynamically disable and enable event listeners.

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.