Code Monkey home page Code Monkey logo

react-json-chart-builder's Introduction

react-json-chart-builder's People

Contributors

brumik avatar knightsean00 avatar zitanemeckova avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-json-chart-builder's Issues

[PF - probably released] Interactive legend hover

I could not make it work yet but this is how it should work:

  • the event props on the wrapper should have: chartNames
  • the LegendComponent should have childName for the corresponding data set (one from chartNames)
  • The createChart component should have name prop
  • All of these seems to be set correctly, the legend from the API is updated with a childName prop, in addition when getting data from the API each series has a unique name string assigned to it, ensuring that the props will remain unique, and providing the same name for the different components in a uniform way.

Demo app improvements

  • Use react router for different chart types, so you can send link to an exact chart.
  • Make the link menu better, probably horizontal instead of vertical so it can grow better.
  • Add a few more examples.
  • Describe the examples so the user can decide which example is probably the closes to the feature they want.
  • The description could be on an index page in "tiles" or just a list of charts.

More example charts

  • Pie chart tooltip
  • Pie chart colored
  • Scatter chart (standalone tooltip)
  • Area chart (legend, no tooltip)
  • Chart for only truncation (legend, axis)
  • Chart for truncation and tootlip on legend
  • Chart for only interactive legend (on click toggle visibility)

Stacked chart y-axis scaling

When stacking the charts the Y-axis is not recalculated and this causes some weird chart layout where a bar heigh for huge values still can be the same as a bar height for small values.

MVP Custom tooltip with colored labels and custom text and value

Create a custom tooltip that supports

  • Colored square before the text
  • Customizable text AND value by a callback function

For MVP: Create a custom tooltip component that will have the next props (at least):

  • color - control the color of the square
  • callback - returns the labelName, color, other optional props to the tooltip AND the data point which is passed to the tooltip (not sure yet how it this possible)

Note: The colored square before the data should be a PF square icon: import { SquareFullIcon } from '@patternfly/react-icons'; or the icon can be a prop to pass for added customizability.

Domain padding at bar chart

When there is a bar chart automatically apply domainPadding even if there is something else than a bar chart.

Maybe memory leak?

Sometimes getting this message:

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.
CreateWrapper

Truncation in the legend?

It may be needed, but it is possible maybe to make this change in a different place outside the charting library.

Make a demo if possible, make it possible if not.

Dual Y axis

We can make this in two way:

  1. Pass a prop and automatically calculate the second axis. (feature)
  2. Pass an array of axes and say which data set is linked to it. (breaking change)

Probably the second approach is more feasible.

Documentation: generate or write one

We need a documentation for this app, we can generate one from the types, this would require for sure to comment all the types in the library which is exported.

Other way to go about this is to write it manually, or have a really well described demo application for most of the sensible combinations of charts.

Option to pass an array of API

There could be a case where the data is in multiple API requests. Option to pass array of API instead of only one.

  • MVP: The default function would only process a single call, to make it work the user of the lib should supply his own function.

Make the legendTooltip a type of ChartTooltipType

The legend tooltip currently is defined as extra props in the schema. It would be better if it would be added as a new tpye in the ChartTooltipTypes so we can have custom functionality modualrized.

Allow passing data instead of API to the charts

The user will have to preprocess their own data, allowing the chart builder to remain more general and not specialized for one endpoint. It will still have to add its own flags probably to the dataset, but this could be done with some exported functions from the library which the user can call, or maybe after, but then allowing the user to overwrite some of the custom added flags for more customization and tweaking if needed.

Interactive legend for single series

Interactive legend for multiple charts from one series

  • Eg.: line chart where we have one series and we are using two different attributes for each line
  • I think maybe we should sacrifice memory and just duplicate the data as if it were two series, so basically we will have a data set for each chart we are displaying, no matter if the data is duplicated --> this is not feasible from the received data
  • It could be derived from the attributes field from the API
  • This would mean that we create series like the following: if we have `attributes: [ 'a', 'b' ] then we duplicate the series we get in a way that one will contain everything without 'a' and the other will contain everything without 'b'

Extend demo app charts

@ZitaNemeckova I got this task over from here: https://issues.redhat.com/browse/AA-925

What we need:

  • Wording of the titles of the current charts, make it more transparent what the chart in that tab uses rather than something like "anomaly detection"
  • Add descriptions which would in short describe what entry in the schema is responsible for the exact behavior we are trying to showcase in that demo chart.
  • Add the tags (if we can come up with some nice set of tags)
  • #81
    • Examples?

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.