Giter Club home page Giter Club logo

d3plus-legend's Introduction

d3plus

D3plus is a JavaScript re-usable chart library that extends the popular D3.js to enable the easy creation of beautiful visualizations.

Installing

If using npm, npm install d3plus. Otherwise, you can download the latest release from GitHub or load from a CDN.

import modules from "d3plus";

d3plus can be loaded as a standalone library or bundled as part of D3plus. ES modules, AMD, CommonJS, and vanilla environments are supported. In vanilla, a d3plus global is exported:

<script src="https://cdn.jsdelivr.net/npm/d3plus@2"></script>
<script>
  console.log(d3plus);
</script>

Resources

Examples and documentation are published in a Storybook here. Each example has controls that are able to modified on the fly, documentation for each method used, and an example code output for the d3plus-react configurations.

Modules

D3plus 2.0 is a collection of modules that are designed to work together; you can use the modules independently, or you can use them together as part of the default build. The source and documentation for each module is available in its repository. Follow the links below to learn more.

Core Packages

React Usage

Examples and Documentation

d3plus-legend's People

Contributors

cnavarreteliz avatar davelandry avatar ffigueroal avatar greenkeeper[bot] avatar greenkeeperio-bot avatar nbond211 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

richhauck

d3plus-legend's Issues

Interactive marks on colorScale

Would be nice to have a feature that puts a mark in the colorScale when hovering an item in the chart. Something like this:
image

RTL support

Expected Behavior

Legend box/labels should be positioned right to left.

Current Behavior

They are currently positioned left to right, and the label padding is on the left hand side.

option to display ColorScale results as Legend

Expected Behavior

When Jenks breaks are too close together, it would be nice to show the scale as discrete buckets with range labels, as in this image:

image

This should be a mode that the user can toggle, and would only apply to "jenks" and "buckets" scales.

Current Behavior

Currently, we get an illegible scale:

image

Steps to Reproduce (for bugs)

https://jsfiddle.net/5f639ph1/

Your Environment

  • Browser Name: Chrome
  • Operating System and Version: macOS High Sierra

add maxWidth method to ColorScale

Currently, on large screens, colorScale can get very wide when positioned horizontally. It would be great to be able to define a maxWidth and center it horizontally in the available space.

add ability to pass function to scale in colorScaleConfig

The desired behavior is the following: depending on the data range being used to calculate the colorscale, I would like to conditionally set the scale type to linear or jenks. Something like the following:

colorScaleConfig {
    scale: () => dataRange > 5 "jenks" : "linear"
}

label function for bars works differently than legend?

label function appears to work different on the bars in the bar chart versus the legend below:

screen shot 2017-06-12 at 9 11 37 am

label: d => `${lookup[d["Living Arrangement"]]} in ${d.kind}`

I would have expected the labeling to work the same so that the same logic could be reused (maybe even the object to the legend should also contain a key in the object that is a values array that could be useful for adding summary stats in legend tooltips?)

An in-range update of d3-array is breaking the build 🚨

Version 1.0.3 of d3-array just got published.

Branch Build failing 🚨
Dependency d3-array
Current Version 1.0.2
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As d3-array is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details
Release Notes v1.0.3
  • Update dependencies.
Commits

The new version differs by 6 commits .

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

uniform color scale legend not matching data?

(not sure if this belongs elsewhere but figured I would start here)

Current Behavior

Screen Shot 2019-05-30 at 12 09 26 PM

In reviewing some vizs for CNY I noticed an issue where certain vizs seems to have black/very dark areas that don't seem to match up with the legend colors?

Steps to Reproduce (for bugs)

  1. https://jsfiddle.net/jonathan_dw/adrwsz3f/

Your Environment

  • Browser Name: Chrome
  • Operating System and Version: macOS 10.13

show tooltip on bucketed ColorScale

Expected Behavior

Sometimes jenks breaks are very close together. In that case, a tooltip when hovering over a portion to show the break range would be fantastic.

Current Behavior

Currently, we just get an illegible scale:

image

Steps to Reproduce (for bugs)

https://jsfiddle.net/5f639ph1/

Your Environment

  • Browser Name: Chrome
  • Operating System and Version: macOS High Sierra

setting label color for a ColorScale

Having trouble setting the text color for a color scale legend. Here's my config below:

colorScaleConfig: {
    color: COLORS_GRADIENT,
    scale: "jenks",
    shapeConfig: {
      fill: "#979797",
      fontColor: "white",
      labelConfig: {
        fontColor: "white", // this doesn't work!
      },
      stroke: "#979797"
    },
    tickSize: 0,
    titleConfig: {
      textTransform: "uppercase"
    }
}

And here is the rendered output:

screen shot 2017-12-15 at 5 17 53 pm

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.