RightAxisLayout.js revision 8648721e29bb657dd5c5ff20f03e86fe50628ce6
88395eed42de4d59f54795b60c8c0a7ab881e153JazzyNico/**
40e5cf3e8f0ddda79b1650df77d0f847a22822bfJazzyNico * RightAxisLayout contains algorithms for rendering a right axis.
646e07284c35ae746e8a0cf0698098e116ebb5a3JazzyNico *
88395eed42de4d59f54795b60c8c0a7ab881e153JazzyNico * @constructor
d048f1c15089c16b8ca1b264513a2f92ff86e703JazzyNico * @class LeftAxisLayout
88395eed42de4d59f54795b60c8c0a7ab881e153JazzyNico * @extends Base
88395eed42de4d59f54795b60c8c0a7ab881e153JazzyNico * @param {Object} config
646e07284c35ae746e8a0cf0698098e116ebb5a3JazzyNico */
88395eed42de4d59f54795b60c8c0a7ab881e153JazzyNicofunction RightAxisLayout(config)
646e07284c35ae746e8a0cf0698098e116ebb5a3JazzyNico{
646e07284c35ae746e8a0cf0698098e116ebb5a3JazzyNico RightAxisLayout.superclass.constructor.apply(this, arguments);
646e07284c35ae746e8a0cf0698098e116ebb5a3JazzyNico}
40e5cf3e8f0ddda79b1650df77d0f847a22822bfJazzyNico
40e5cf3e8f0ddda79b1650df77d0f847a22822bfJazzyNicoRightAxisLayout.ATTRS = {
40e5cf3e8f0ddda79b1650df77d0f847a22822bfJazzyNico axisRenderer: {
40e5cf3e8f0ddda79b1650df77d0f847a22822bfJazzyNico value: null
40e5cf3e8f0ddda79b1650df77d0f847a22822bfJazzyNico }
88395eed42de4d59f54795b60c8c0a7ab881e153JazzyNico};
d048f1c15089c16b8ca1b264513a2f92ff86e703JazzyNico
88395eed42de4d59f54795b60c8c0a7ab881e153JazzyNicoY.extend(RightAxisLayout, Y.Base, {
88395eed42de4d59f54795b60c8c0a7ab881e153JazzyNico /**
88395eed42de4d59f54795b60c8c0a7ab881e153JazzyNico * @protected
88395eed42de4d59f54795b60c8c0a7ab881e153JazzyNico *
88395eed42de4d59f54795b60c8c0a7ab881e153JazzyNico * Sets the length of the tick on either side of the axis line.
88395eed42de4d59f54795b60c8c0a7ab881e153JazzyNico *
88395eed42de4d59f54795b60c8c0a7ab881e153JazzyNico * @method
d048f1c15089c16b8ca1b264513a2f92ff86e703JazzyNico */
646e07284c35ae746e8a0cf0698098e116ebb5a3JazzyNico setTickOffsets: function()
646e07284c35ae746e8a0cf0698098e116ebb5a3JazzyNico {
646e07284c35ae746e8a0cf0698098e116ebb5a3JazzyNico var ar = this.get("axisRenderer"),
646e07284c35ae746e8a0cf0698098e116ebb5a3JazzyNico majorTicks = ar.get("styles").majorTicks,
646e07284c35ae746e8a0cf0698098e116ebb5a3JazzyNico tickLength = majorTicks.length,
646e07284c35ae746e8a0cf0698098e116ebb5a3JazzyNico halfTick = tickLength * 0.5,
646e07284c35ae746e8a0cf0698098e116ebb5a3JazzyNico display = majorTicks.display;
646e07284c35ae746e8a0cf0698098e116ebb5a3JazzyNico ar.set("topTickOffset", 0);
646e07284c35ae746e8a0cf0698098e116ebb5a3JazzyNico ar.set("bottomTickOffset", 0);
646e07284c35ae746e8a0cf0698098e116ebb5a3JazzyNico
88395eed42de4d59f54795b60c8c0a7ab881e153JazzyNico switch(display)
646e07284c35ae746e8a0cf0698098e116ebb5a3JazzyNico {
646e07284c35ae746e8a0cf0698098e116ebb5a3JazzyNico case "inside" :
646e07284c35ae746e8a0cf0698098e116ebb5a3JazzyNico Error!

 

There was an error!

null

java.lang.NullPointerException