File tree Expand file tree Collapse file tree 1 file changed +22
-14
lines changed
Expand file tree Collapse file tree 1 file changed +22
-14
lines changed Original file line number Diff line number Diff line change @@ -136,21 +136,29 @@ angular.module('angular-rickshaw', [])
136136
137137 if ( scope . features ) {
138138 if ( scope . features . xAxis ) {
139- var xAxisConfig = {
140- graph : graph
141- } ;
142- if ( scope . features . xAxis . timeUnit ) {
143- var time = new Rickshaw . Fixtures . Time ( ) ;
144- xAxisConfig . timeUnit = time . unit ( scope . features . xAxis . timeUnit ) ;
145- }
146- if ( scope . features . xAxis . tickFormat ) {
147- xAxisConfig . tickFormat = scope . features . xAxis . tickFormat ;
148- }
149- if ( scope . features . xAxis . ticksTreatment ) {
150- xAxisConfig . ticksTreatment = scope . features . xAxis . ticksTreatment ;
151- }
152139 if ( ! xAxis ) {
153- xAxis = new Rickshaw . Graph . Axis . X ( xAxisConfig ) ;
140+ var xAxisConfig = {
141+ graph : graph
142+ } ;
143+ if ( scope . features . xAxis . timeUnit ) {
144+ var time = new Rickshaw . Fixtures . Time ( ) ;
145+ xAxisConfig . timeUnit = time . unit ( scope . features . xAxis . timeUnit ) ;
146+ }
147+ if ( scope . features . xAxis . tickFormat ) {
148+ xAxisConfig . tickFormat = scope . features . xAxis . tickFormat ;
149+ }
150+ if ( scope . features . xAxis . ticksTreatment ) {
151+ xAxisConfig . ticksTreatment = scope . features . xAxis . ticksTreatment ;
152+ }
153+ if ( scope . features . xAxis . time ) {
154+ if ( scope . features . xAxis . time . local ) {
155+ xAxisConfig . timeFixture = new Rickshaw . Fixtures . Time . Local ( ) ;
156+ }
157+ xAxis = new Rickshaw . Graph . Axis . Time ( xAxisConfig ) ;
158+ }
159+ else {
160+ xAxis = new Rickshaw . Graph . Axis . X ( xAxisConfig ) ;
161+ }
154162 xAxis . render ( ) ;
155163 }
156164 else {
You can’t perform that action at this time.
0 commit comments