Coder Social home page Coder Social logo

axisjs's Introduction

AxisJS Build Status codecov.io Documentation status Join the chat at https://gitter.im/times/axisJS

AxisJS is a light Angular-based app for generating charts. It combines with the AxisWP WordPress plugin to add rich charting capabilities to WordPress.

Live demo of AxisJS here

AxisJS is built atop the Yeoman Gulp-Angular generator and currently makes use of C3 to build charts.

AxisJS owes a huge debt of gratitude to Quartz's ChartBuilder, from where much of the PNG/SVG output code is taken (in addition to some of the interface design). However, Axis is more extensible and intended to be used for online interactive graphics.

Bower

bower install axisjs

Project goals

  1. Enable easy integration of various D3-based frameworks into a simple interface
  2. Enable a wide array of data input methods
  3. Be modular enough to allow charting frameworks to easily be replaced
  4. Allow for straight-forward customisation and styling
  5. Allow for easy integration into existing content management systems
  6. Allow journalists to easily create charts that are embeddable across a wide array of devices and media

To build

  1. npm install
  2. bower install
  3. gulp build

Modifying

The source is in the src/ folder, which gets built to dist/ when you do gulp build. When working on it, run gulp serve to invoke a light HTTP server that auto-reloads the page when you save a file. Styles are in Sass at src/app/index.scss.

Contributing

Please do a new feature branch when forking and squash your commits before making a pull request. Pull requests welcomed and encouraged. I especially welcome any documentation or unit testing PRs!

API Docs

Inline documentation is in ngDoc format and gets built to docs during gulp build. View API docs online here.

Roadmap/ToDos

  • Abstract chart configuration into a provider so that app/scripts/directives/buildchart.js and app/scripts/directives/exportchart.js aren't so tightly bound to C3
  • ALL the unit tests
  • Documentation and cleanup of buildchart.js and exportchart.js
  • Abstract each output format into factories so more can be modularly added
  • Abstract out vendor functionality — i.e., make the colour picker replaceable
  • Create an external config file with settings like colour scheme
  • Improve inline documentation
  • Make adding categorical axes more straight-forward
  • Create adapters for nvd3 and other SVG-based charting libraries.
  • Componentise so it can be easily dropped into any CMS or app

Contributors

Lead developer: Ændrew Rininsland (@aendrew)

Design contributions

axisjs's People

Contributors

ejb avatar gitter-badger avatar rexmondo 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

Watchers

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

axisjs's Issues

Add toggle controls

One thing DataWrapper does is it allows one to break data into two views that the user can tab between. axisJS currently assumes the user wants ALL the data in a single chart.

Considerations:

  • What impact would this have on the print output? I.e., how do you represent two charts if one is hidden?
  • What additional code would this add to things like the CMS and WordPress outputs?

Ability to export PNG with white background

It'd be great to have an optional toggle for a white background on the charts. When we tweet the charts the Twitter mobile app uses a black background, meaning we're having to manually add white backgrounds to the chart image.

Default to tab for delimiter

Excel and Google Sheets both copy data to clipboard as TSV. If the header row (or elsewhere) has a comma in it (I.e., some sort of long poll question like "The PM should try to reduce the bill, but if unsuccessful, should still pay"), PapaParse will fail miserably.

Given neither Excel nor Sheets has an option to auto-string delimit text, one solution might be to force PapaParse to assume tab-delimited by default.

Legend is off-centre

I may just be trippin', but it seems the legend is just slightly off-centre from the chart. Might be more of a C3.js issue.

Outputting SVG for print

The ability to output charts to SVG for print use

  • number of columns needs to be specified
  • height needs to be specified
  • more details to be collected from Jenny Holly (ST) and Matt Swift (TT)

Add traditional colour picker for power users

Even though one the design considerations was to prevent users from picking colours willy-nilly (and thus stay within the publication stylesheet), this is less of a consideration for power users and people outside NewsUK using it in an open source capacity.

Thus, some sort of "power user mode" (activated by Konami code, perhaps?) enabling full colour pickers might be helpful. Probably needs a bit more thought before implementing...

Add vertical axis charts

Some comparison charts work better if the bars are flowing vertically instead of horizontally. C3 can probs do this. Probs.

We need a logo

Seriously, the whole "orange thatched background" thing is getting ridiculous.

Regression: SVG output seems to be broken

Illustrator complains "Clipping will be lost on roundtrip to Tiny", and then nothing displays except the legend and titles. Chrome displays fine, http://validator.w3.org/check fails with two issues.

Update: W3C validator checks out if I remove the bits it spots. However, it still does not load in Illustrator.

Pre-set style settings

A user should be able to choose a Title and a Section and the fonts / colours available should change to reflect pre-set styles

Write a test for embedOutput.js

Right now, the only way to get interactive charts out of axisJS is to use the WordPress plugin. For the 1.0.0 release, a helpful feature would be a JavaScript embed code output, in addition to a JSON config output. These should be encapsulated into services as per project best practices.

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.