Git Product home page Git Product logo

svend3r's Introduction

Svend3r v0.1.0-beta

Introducing Svend3r, a plug and play D3 charting library for Svelte!

There are great resources for building your own charts with Svelte, including Pancake (from Rich Harris) and Layer Cake (from Michael Keller), but the Svend3r team wants to make it even easier.

How do I use Svend3r?

- Head to the Svend3r.dev homepage

Svend3r Home Page

- Decide which chart works best for your application

Svend3r Bar Chart

- Ensure your data is formatted correctly by checking the Data Schema Tab

Svend3r Bar Chart Data Schema

- Manipulate the properties to customize the look and feel of your chart

Svend3r Bar Chart Properties

- Copy the code and the data from the Code and Data tabs

Svend3r Bar Chart Code

Svend3r Bar Chart Data

- Paste the code and data into a Svelte repl or directly into your component

Svend3r Area Repl

Thats it!

Want to Contribute?

The incredibly active, supportive community is one of the best parts of building in Svelte. Do you have a chart component you'd like to share? Notice anything missing, not working, or not available yet that you'd like to see? Submit a pull request to the contributor branch!

Contributors

svend3r's People

Contributors

ariel32lubin avatar isaaclsaunders avatar jameslaff avatar xtc2008 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

svend3r's Issues

Cannot have duplicate keys in keyed each

Describe the bug

So first off, kudos for building svend3r. It bridges Svelte and D3 very nicely. :)

I have been trying a few of the examples and they do work, however, when I put my own data into it. It dies with an error of "Cannot have duplicate keys in keyed each".

To Reproduce

Steps to reproduce the behavior:

  • take any example
  • adjust the data to have a duplicate value for the "y"

Example of data that triggers it (copied from the bar chart):

export default [
  { letter: 'A', frequency: 0.08167 },
  { letter: 'B', frequency: 0.08167 }
];

Expected behavior

I was expecting to see two bars of equal height in the chart.

Bar Chart X-Axis Label Display Issues

Describe the bug
Svelte REPL
The x-labels are not centered with the ticks on the bar chart, and the text gets cut off vertically (see the 'y' in "bye").

I copied the default code from the website here, kept all the style parameters the same (except I removed the y-axis units) and made a component in my project.

I was able to fix the text centering by changing the x-axis text component to:
<text y={marginBottom} dx={reactiveXScale.bandwidth() / 2} style="text-anchor: middle;">{xVal}</text>,
but I am having trouble fixing the text height cut off bug.

To Reproduce
Steps to reproduce the behavior:

  1. See Svelte REPL

Expected behavior
The x-labels are centered and the text does not get cut off.

Screenshots
Screen Shot 2022-04-10 at 3 17 54 PM

Desktop (please complete the following information):

  • OS: Mac OS Monterey, M1
  • Browser: Firefox
  • Version: 99

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.