Commit e1fc70e5 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Add axis label format option

parent f1355168
...@@ -72,6 +72,7 @@ ...@@ -72,6 +72,7 @@
__axis_y_text = getConfig(['axis','y','text'], null), __axis_y_text = getConfig(['axis','y','text'], null),
__axis_y_rescale = getConfig(['axis','y','rescale'], true), __axis_y_rescale = getConfig(['axis','y','rescale'], true),
__axis_y_inner = getConfig(['axis','y','inner'], false), __axis_y_inner = getConfig(['axis','y','inner'], false),
__axis_y_format = getConfig(['axis','y','format'], function(d){ return d; }),
__axis_y2_show = getConfig(['axis','y2','show'], false), __axis_y2_show = getConfig(['axis','y2','show'], false),
__axis_y2_max = getConfig(['axis','y2','max'], null), __axis_y2_max = getConfig(['axis','y2','max'], null),
__axis_y2_min = getConfig(['axis','y2','min'], null), __axis_y2_min = getConfig(['axis','y2','min'], null),
...@@ -79,6 +80,7 @@ ...@@ -79,6 +80,7 @@
__axis_y2_text = getConfig(['axis','y2','text'], null), __axis_y2_text = getConfig(['axis','y2','text'], null),
__axis_y2_rescale = getConfig(['axis','y2','rescale'], true), __axis_y2_rescale = getConfig(['axis','y2','rescale'], true),
__axis_y2_inner = getConfig(['axis','y2','inner'], false), __axis_y2_inner = getConfig(['axis','y2','inner'], false),
__axis_y2_format = getConfig(['axis','y2','format'], function(d){ return d; }),
__axis_rotated = getConfig(['axis','rotated'], false); __axis_rotated = getConfig(['axis','rotated'], false);
// grid // grid
...@@ -833,6 +835,8 @@ ...@@ -833,6 +835,8 @@
subY2.domain(y2.domain()); subY2.domain(y2.domain());
xAxis.ticks(data.length < 10 ? data.length : 10); xAxis.ticks(data.length < 10 ? data.length : 10);
yAxis.ticks(3).outerTickSize(0).tickFormat(__axis_y_format);
yAxis2.ticks(3).outerTickSize(0).tickFormat(__axis_y2_format);
/*-- Main Region --*/ /*-- Main Region --*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment