Git Product home page Git Product logo

Comments (3)

wrobstory avatar wrobstory commented on August 20, 2024

Yeahhhhh that needs to get fixed in data.py to something like the following:

if isinstance(data, (list, tuple)):
    data = [(x, y) for x, y in enumerate(data)]

values = [{'idx': item[0], 'col': 'data', 'val': item[1]} for item in data]

I'll try to get to it tonight- if you want to change it and submit the PR, I'll happily pull it in :)

from vincent.

jobevers avatar jobevers commented on August 20, 2024

Looking at it again, I think my real issue is that there isn't a way to
specify "x/idx" and "y/val" values in the order that you want.

You can pass in a 1-D list for values and are forced to use (0, 1, 2, 3...
for the idx) or you can create a dictionary which will mess up the ordering.

A different approach might be to check the input, if its a list or tuple,
check if its 1D - if so, enumerate it to create a 2D array. If its already
2D then leave it. If its something else... raise an error.

If its a dictionary, grab the items() to create a 2D array.

On Sun, Sep 8, 2013 at 1:07 PM, Rob Story [email protected] wrote:

Yeahhhhh that needs to get fixed in data.py to something like the
following:

if isinstance(data, (list, tuple)):
data = [(x, y) for x, y in enumerate(data)]

values = [{'idx': item[0], 'col': 'data', 'val': item[1]} for item in data]

I'll try to get to it tonight- if you want to change it and submit the PR,
I'll happily pull it in :)


Reply to this email directly or view it on GitHubhttps://github.com//issues/54#issuecomment-24025933
.

from vincent.

wrobstory avatar wrobstory commented on August 20, 2024

Going to tackle this tomorrow-this-weekish. I hope.

from vincent.

Related Issues (20)

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.