Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Chart Axis Modularization #373

merged 129 commits into from Jan 14, 2013


None yet
10 participants

tripp commented Dec 21, 2012

This is a refactoring of the chart's axis layer so that it is more modular. In this update, I've broken up the charts module into several smaller modules that can be downloaded as needed to build custom chart applications. For example, the below code snippet will only pull down code necessary to build a sparkline.

YUI().use('axis-numeric-base', 'axis-time-base', 'series-line', function (Y) {
    var myDataValues = [
        {date: "01/01/2009", open: 90.27, close: 170.27},
        {date: "01/02/2009", open: 91.55, close: 8.55},
    categoryAxis = new Y.TimeAxisBase({
        dataProvider: myDataValues,
        keys: ["date"]
    seriesAxis = new Y.NumericAxisBase({
        dataProvider: myDataValues,
        keys: ["close"]
    graphic = new Y.Graphic({
        render: "#mychart"
    series = new Y.LineSeries({
        graphic: graphic,
        xAxis: categoryAxis,
        xKey: "date",
        yAxis: seriesAxis,
        yKey: "close",
        rendered: true,
        styles: {
            line: {
                weight: 1

Despite the many diffs in this commit, there is not much actual code change. The vast bulk of diffs are API Doc updates so that one can view the propose breakout of charts modules by running yogi serve. Some diffs are due to code being moved into new classes for modularity. This is a work in progress (for this sprint) and the pull request is for the benefit of broadcasting the upcoming changes.

While any feedback is always welcome, the emphasis of this request is on the classes outlined in the attached diagrams and the new modules.





Also important are:

Additionally, you can run yogi serve on the charts directory and click the API Docs link to get a good view of the modules.

The 'charts' and 'charts-legend' modules will have the same functionality as before.

solmsted and others added some commits Oct 10, 2012

@solmsted solmsted Added yui-soon 2ce832e
@solmsted solmsted Added wrapper functions around setImmediate and setTimeout. bc177ac
@juandopazo juandopazo Load JSON polyfill based on feature test. Rename old files to -polify…
… versions, add native versions, add meta tests, remove old references from polyfills
@juandopazo juandopazo update build file with polyfill versions c9dc699
@juandopazo juandopazo Add reference to configuration options in docs 3579c92
@juandopazo juandopazo Fix bad copypaste in native stringify 6619787
@juandopazo juandopazo Move extra stringify functions to native module 528e1d4
@juandopazo juandopazo Document configuration options c1bfa14
@juandopazo juandopazo Merge remote-tracking branch 'upstream/master' into json-polyfill 9beb03c
@juandopazo juandopazo Merge remote-tracking branch 'upstream/master' into json-polyfill 14536cf
@juandopazo juandopazo Check for explicit false for config options bf5c9fa
@juandopazo juandopazo Fix references to scripts 7ff3f61
@juandopazo juandopazo Rename "polyfill" to "shim" 4811235
@juandopazo juandopazo Merge remote-tracking branch 'upstream/master' into json-polyfill 64f23f2
@juandopazo juandopazo Rebuild 7e3537d
@juandopazo juandopazo Merge branch 'master' of git://github.com/yui/yui3 into json-polyfill 0f00d57
@juandopazo juandopazo Added isShim property to parse and stringify
To be able to test which implementation is being used
@juandopazo juandopazo Docs mention to changes and history.md update 1b3b9bc
@tripp tripp Merge branch 'master' into 3.x f242ce7
@tripp tripp Merge branch '3.x' of github.com:yui/yui3 into 3.x 736d5c1
@jafl jafl Merge branch 'master' of git://github.com/yui/yui3 d93d6bf
@jafl jafl allow gallery group to be reconfigured without update function c9ec7cb
@solmsted solmsted Reverted previous commits. dae59cd
@solmsted solmsted Added soon. 72d6d67
@unkillbob unkillbob Bump Handlebars to 1.0.rc.1. Fixes 2532995 (sanity test cases added f…
…or scoping issue relevant to ticket).
@unkillbob unkillbob Merge branch 'master' of git://github.com/yui/yui3 374374c
@unkillbob unkillbob Merge branch 'master' of git://github.com/yui/yui3 226a83b
@unkillbob unkillbob Update Handlebars import Makefile to modify this.Handlebars declarati…
…ons/references to the original global variable declaration rather than do it manually.
@davglass davglass Fixed merge commit and rebuilt handlebars 4a84f97
@davglass davglass Removed ant build step and replaced with shifter 92db80a
@davglass davglass Merge branch 'loader-allow-gallery-reconfig' of git://github.com/jafl…
…/yui3 into jafl-loader-allow-gallery-reconfig
@davglass davglass Updated the yui2 group with the same fix a0b8684
@davglass davglass Seed and Loader eb9abc7
@tilomitra tilomitra add responsive grids css rule to cssgrids and update build.json 721ba08
@tilomitra tilomitra add cssgrids-responsive manual test 2b19f72
@lsmith lsmith Normalize disabled elements bubbling in IE
Delegate was picking up the bubbled events from IE's odd treatment of event
propagation from disabled elements. In other browsers, events are swallowed
entirely. In IE, they originate from the parent element instead of the disabled
@lsmith lsmith Remove dev leftovers, add test
Unfortunately have to use a manual test for this, since the test assertion is
that the browser either *doesn't* generate events, or that generated events
*don't* propagate to the delegate subscriber.
@solmsted solmsted When loading scripts try to hook a little deeper into Node's module s…

Trying to normalize the environment between scripts loaded by `Y.Get.js` and `require`.

Fixes #2533010
Fixes #2533011
@ericf ericf Merge branch 'dev-master' into dev-3.x 918cc65
@tilomitra tilomitra add newlines 3b2d9f2
@davglass davglass Seed and Loader build for dev-3.x branch 8091041
@davglass davglass Merge branch 'dev-master' into dev-3.x 2701c02
@davglass davglass Merge branch 'dev-master' of github.com:davglass/yui3 into dev-3.x 208f1d8
@lsmith lsmith Build event-delegate 7056d24
@lsmith lsmith Merge branch 'delegate-vs-disabled' into dev-3.x
Fixes #2532677
@davglass davglass Fixed merge conflicts 9cc3779
@davglass davglass Removed un-needed TestRunner.run from JSON cli test c8a4662
@davglass davglass Merge branch 'dev-3.x' of git://github.com/yui/yui3 into dev-3.x ef5082d
@davglass davglass Merge branch 'get-nodejs' of git://github.com/solmsted/yui3 into solm…
@lsmith lsmith Update HISTORY for delegate vs disabled change
Used version 3.9.0 rather than 3.8.1. Let me know if this was the wrong version.
@tripp tripp Merge remote-tracking branch 'upstream/dev-3.x' into dev-3.x f1636fd
@tripp tripp Modularize axis layer so that chart components can be loaded as need …
…to build custom axis. First pass.
@davglass davglass Shifter build after merge 7fb15be
@tripp tripp Removed trailing whitespace. bfa29e6
@lsmith lsmith Merge branch 'delegate-history' into dev-3.x 20aa5dc
@lsmith lsmith Note +event-base-ie to simpleyui in HISTORY.md 9c114d6
@tilomitra tilomitra update responsive grids docs dea743b
@tilomitra tilomitra rename yui3-g-responsive to yui3-g-r b358906
@tilomitra tilomitra add helper classes to manual test 31ed444
@tilomitra tilomitra add responsive grids newspaper example 42adc25

davglass and others added some commits Jan 4, 2013

@davglass davglass Build 9d69ddd
@davglass davglass Clean up extra substitute dep that was not used in Uploader aedf443
@davglass davglass Clean up extra substitute dep that was not used in Calendar dbdf94e
@davglass davglass Removed substitute dep from DD test 456b27f
@davglass davglass Removed unused substitute dep from Editor 9212d02
@davglass davglass Updated HISTORY files 4d43b06
@davglass davglass Added formal deprecation messaging 2d0f77c
@davglass davglass Remove old deprecated modules from the system 5c23130
@tilomitra tilomitra Merge branch 'grids' of https://github.com/tilomitra/yui3 into grids 059eda9
@tilomitra tilomitra Merge branch 'grids' into dev-3.x 9d5a564
@davglass davglass Merge branch 'dev-3.x' into solmsted-get-nodejs 5c2cbfa
@davglass davglass Fixed failing tests to use the new expected include paths 849e936
@davglass davglass Fixed lint warnings for Get 8006e66
@davglass davglass Removed an extra console.log f60b61c
@tripp tripp Moved methods from axis-base into axis. Fixed small bug in TopAxisLay…
@davglass davglass Updated HISTORY file 4de358b
@davglass davglass Added yql-jsonp module to help with loading in other environments 2cda518
@davglass davglass Loader and Seed build for responsive grids e348cb6
@davglass davglass Added CSS Grids resposive build files f105e45
@davglass davglass Removing some old files d41311a
@davglass davglass Source cleanup and added execute call to Y.Get.js 73e0889
@davglass davglass Making tests live and active 0fe4fc5
@davglass davglass Removed jsonp from Hudson builds for now 3423d67
@davglass davglass Added comment to explain the .execute call b4ddbbc
@davglass davglass Seed Build 3747671
@davglass davglass Fixed bad merge 0ddbfdd
@davglass davglass Seed BUild c60389e
@davglass davglass Dropping the git level to 30 fa3393b
@davglass davglass After merge, rebuild seed 466f8cc
@davglass davglass Added async flag to JSONP calls 458cb87
@davglass davglass Added async passthrough test 78a4c18
@davglass davglass Bumped up request dependency b802c39

davglass commented Jan 8, 2013

I'm not sure why this is broken on Travis, but this builds perfectly fine locally from a clean clone.


hojberg commented Jan 8, 2013

thats a damn fine pull request description


davglass commented Jan 10, 2013

👍 Merge it..


tripp commented Jan 14, 2013

I have yet to merge any changes. I had to remove a dependency on the Y.Graph class from some series types to allow for modular implementation.

@tripp tripp merged commit 90db190 into yui:dev-3.x Jan 14, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment