Giter Club home page Giter Club logo

nivo's Issues

Improve tooltip position

For now, tooltip is always placed on right of the current cursor, it could be placed according to container size.

Background nodes appear wrong after round-tripping "leavesOnly"

Steps to reproduce:

  1. Go to http://nivo.rocks/#/treemap
  2. Click on the leavesOnly toggle.
  3. Click on the leavesOnly toggle again.
  4. (Bonus) Roll The Dice

Expected result:

  • The treemap changes somehow, then changes back to how it looked before.
  • Changing source data looks fine

Observed results:

  1. Load page:
    image
  2. Leaves Only, On:
    image
  3. Leaves Only, Off:
    image
  4. Roll The Dice:
    image

Also

Leaves Only says

Only render leaf nodes (no children).

Shouldn't that be (no parents)?

Animation when changing pie data

Great lib!

I was wondering why there were no animation when pie datas are updated?
It works for the line component for example and its nice.

Negative Values on <Chart />

Hello guys,

I'm trying to display negative values on a chart, they will display <> when all of them are negative, when there's more than one positive, anything below zero will be ignored, is there a way to have minY maxY config?

Regards,

Only import from `d3-*` modules

There are a few files which import from d3 which brings in all the d3-* modules even if they aren't used. While webpack & rollup can mitigate this, they still leave many unused functions.

Looking through the code I found these examples:

# src/lib/charts/bubble/BubbleD3.js
import { hierarchy, pack } from 'd3'

# src/lib/scale.js
import { scaleLinear, scaleBand, scalePoint } from 'd3'

# src/lib/charts/labels.js
import d3 from 'd3'

#src/lib/charts/pie/PieD3Svg.js
import d3 from 'd3'

# src/lib/charts/bubble/BubbleD3Svg.js
import d3 from 'd3'

I apologize for the noise if I've simply found some loose ends that aren't used/exported.

Feature request: Canvas

Opening this so there's a way to track the "I'm also considering canvas support" comment from the README

Add ability to filter stack component layers

We should be able to hide certain layers from the Stack component.

Workflow:

  • user clicks on a layer
  • if there's more than 1 active layer
    • the layer disappear
    • a small circle having the same color appear to re-activate the hidden layer
    • if user clicks on the circle, the layer becomes active

This feature also have an impact on StackDots component.

Ability to customize hovering label

Hello! Is there currently a way to customize the label that shows in when one hovers over a section of a chart? For example, on the following Pie chart:
image
Say I want to display the number in a friendlier matter by formatting it the same way one formats the other labels (passing a string or a function that receives the node)

Support for events (onClick etc.)

I noticed there is an onClick prop in chart component, but it's probably not used for anything right now. Do you plan on implementing some basic events with access to data of clicked element? I am currently trying to implement bar chart with onClick event (to filter in hourly data). It should also have formatted tooltip. I really like your library, it has beautiful visuals and very useful options, but I sadly need onclick for my use case.

Memoization

Some components requires intensive calculations when a property change, those calculations should be memoized in order to improve performance.

  • CalendarLayout monthPathAndBBox

Bubble components

  • <Bubble />
  • <RepsonsiveBubble />
  • <BubbleD3 />
  • <RepsonsiveBubbleD3 />
  • <BubblePlaceholders /> with support for html & svg
  • <RepsonsiveBubblePlaceholders />

ResponsivePie not rendering anything.

I try to output a Pie chart, but the responsive pie chart only outputs an empty div:

<div style="width: 100%; height: 100%;"></div>

My settings look like this (and I use the sample data from website):

const settings = {
      width: 300,
      height: 300,
      margin: { top: 10, right: 10, bottom: 10, left: 10 },
      innerRadius: 0.9,
      cornerRadius: 3,
      padAngle: 1,
      enableSlicesLabels: false,
      enableRadialLabels: false,
      isInteractive: false,
    };

It does not work if I remove width/height either. Am I doing something wrong?

Labels overflow on Pie chart

If I have a pie chart with labels, some labels end up outside of the drawn SVG and are since not shown:
image
In this image, I gave the SVG tag a gray border color so it is clear what is been cut off.

The code for the chart looks like this:

<Pie 
    data={this.props.chartData}
    height={500} 
    width={500}
    margin={{
      left: 10,
      right: 50,
      top: 10,
      bottom: 10
    }}
    // not relevant other info
 />

Re-add missing Sankey from demo site

The title captures the gist of it. The sankey diagram is not on the demo site. It is linked by the README but leads to a blank page. With that in mind, there may be others.

Thanks for the great project!

Cannot resolve 'file' or 'directory' ./BubbleProps

After Updating to nivo@^0.26.2:
ERROR in .//nivo/lib/components/charts/bubble/index.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./BubbleProps in */node_modules/nivo/lib/components/charts/bubble
@ ./
/nivo/lib/components/charts/bubble/index.js 41:19-43

Problem with http://nivo.rocks

I have tried to visit the website and got an error (waterfox screenshot):

selection_001

Also, to double-confirm the issue, I have tested it via curl:

stefanos@debian:~$ curl -vI https://nivo.rocks/
*   Trying 104.18.44.131...
* TCP_NODELAY set
* Connected to nivo.rocks (104.18.44.131) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.0 (IN), TLS header, Unknown (21):
* TLSv1.0 (IN), TLS alert, Server hello (2):
* error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
* stopped the pause stream!
* Closing connection 0
curl: (35) error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

As you can see, on the ticket title I use http://nivo.works whereas in curl I use https protocol, because the link used in project description it redirects to https://nivo.rocks.

Bubble component

Hello! I'm trying to find a way to group bubbles by color in the same parent so it looks like this:

screen shot 2017-09-15 at 10 50 30 am

Is there an easy way to do it?

IE11 endsWith polyfill

I tried to look at the demo at http://nivo.rocks/ using IE11

Error on endsWith:

export var closedCurvePropKeys = curvePropKeys.filter(function (c) {
return c.endsWith('Closed');
});

Polyfill, if you care to add, or you could use ES6-shim as there might be more issues:

if (!String.prototype.endsWith)
String.prototype.endsWith = function(searchStr, Position) {
// This works much better than >= because
// it compensates for NaN:
if (!(Position < this.length))
Position = this.length;
else
Position |= 0; // round position
return this.substr(Position - searchStr.length,
searchStr.length) === searchStr;
};

IE sucks, but some of us are forced to use it exclusively at work.

Some blabbing about the issue:
https://www.sitepoint.com/community/t/endswith-issue-in-ie11/233838

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.