Git Product home page Git Product logo

viiksetjs's Introduction

viiksetjs

A lightweight Javascript graphing library for React based on styled-components and vx.

NOTE:

Viiksetjs is now two separate packages, @viiksetjs/web and @viiksetjs/utils you can find the documentation here: Web | Utility

About

Viikset is the halfway point between visualization libraries with atomic control like d3 and out of the box solutions like recharts or chartjs. Big shout out to Harrison Shoff @hshoff and the people over at vx who helped shape the thinking for this type of visualization library.

It is meant to serve both those who want a high level of control (see the 'Interop with vx' section in the web docs) and those who want to throw together charts quickly with little to no configuration. If you like this library and want to have more granular control over your chart components, I would strongly suggest checking out the vx repo and familiarizing yourself with it, as any vx components can be used in tandem with Viikset.

viiksetjs's People

Contributors

dependabot[bot] avatar jamestthompson3 avatar kirillku avatar tienpham94 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

viiksetjs's Issues

npm run watch failed

error message:

> [email protected] watch /work/d3/viiksetjs
> babel --watch src --out-dir lib

Successfully compiled 23 files with Babel.
The optional dependency chokidar failed to install and is required for --watch. Chokidar is likely not supported on your platform.
{ Error: Cannot find module 'anymatch'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/work/d3/viiksetjs/node_modules/chokidar/index.js:6:16)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3) code: 'MODULE_NOT_FOUND' }

BarChart labels are in reverse order when using Firefox and ChartArea type is "ordinal"

BarChart labels are in reverse order when using Firefox and ChartArea type is "ordinal". Labels are in correct order when using Google Chrome or Microsoft Edge.

Expected Behavior

Expected labels to match with respective values. "First" should have value of 1, "second" should have value of 2 and so on.

Actual Behavior

Labels are displayed in reverse order. "Fifth" has value of 1, "fourth" has value of 2 and so on.

issue

Steps to Reproduce the Problem

  1. Create app using "npx create-react-app my-app"
  2. Navigate to app folder and install viiksetjs using "yarn add viiksetjs"
  3. Give root component some size so chart is visible eg.
#root {
  width: 700px;
  height: 300px;
}
  1. Paste following minimal example to App.js
import React, { Component } from 'react';
import { ChartArea, BarChart } from 'viiksetjs';

class App extends Component {
  render() {
    const data = [
      {xKey: 'first', dataKey: 1},
      {xKey: 'second', dataKey: 2},
      {xKey: 'third', dataKey: 3},
      {xKey: 'fourth', dataKey: 4},
      {xKey: 'fifth', dataKey: 5}
    ];
    return (
      <ChartArea
        data={data}
        xKey="xKey"
        type="ordinal"
      >
        <BarChart dataKey="dataKey" />
      </ChartArea>
    );
  }
}

export default App;
  1. Run app using "yarn run start"
  2. Open app in Firefox

Specifications

Version: 0.0.29
Browser: Firefox Quantum 64.0 (64-bit)

Biaxial with BarChart is not right

awesome project!

I have a question,when i change examples/src/components/Biaxial.js:

<BarChart color="rgb(244, 196, 65)" dataKey="posts" axisId="posts" />
 <LineChart color="rgb(238, 66, 244)" dataKey="users" axisId="users" />

and the BarItem is not right as below:

image

maybe calcuation of Bar is not right?

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.