Git Product home page Git Product logo

Comments (2)

hobbes7878 avatar hobbes7878 commented on July 28, 2024

I duplicated this behavior on ours. This should respect the given order.

Looks like sort order in API is incorrect at chartwerk.datamap.sort, which is set here.

Looking at the csvtojson library that gives the order, one person had the same issue, which was fixed by turning off the type sniffing in checkType param. That is now false by default in current versions, so it may just need a version bump in this repo.

If that doesn't fix it, then I may need to set the header order from the raw data string before converting to JSON, which I'll need to test against some other conditions...

Adding as bug for quick fix. (hi, ariana!)

from chartwerk-editor.

hobbes7878 avatar hobbes7878 commented on July 28, 2024

So on closer look, EMCA guarantees that keys that are integer-like will always come before alpha keys in JS objects (though alpha keys can be arbitrarily sorted).

So to sort data properties, chart templates should use the sort order in chartwerk.datamap.sort, which will be an array of the headers as sorted in the original data.

@arianagiorgi you may just need to adjust the data table chart template a little to get what you need now.

from chartwerk-editor.

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.