Exposing x2 and y2 axis on line with focus chart so user can set different if needed, BUT user must set both now

This commit is contained in:
Bob Monteverde 2012-07-12 01:07:36 -04:00
parent affd81b0a4
commit cc95d977d8
4 changed files with 14 additions and 8 deletions

View File

@ -54,9 +54,13 @@ nv.addGraph(function() {
chart.xAxis
.tickFormat(d3.format(',f'));
chart.x2Axis
.tickFormat(d3.format(',f'));
chart.yAxis
.tickFormat(d3.format(',.2f'));
chart.yA2xis
.tickFormat(d3.format(',.2f'));
d3.select('#chart svg')
.datum(testData())

View File

@ -3616,7 +3616,7 @@ nv.models.lineWithFocusChart = function() {
x2Axis
.tickFormat(xAxis.tickFormat()) //TODO: make sure everythign set on the Axes is set on both x and x2, and y and y2 respectively
//.tickFormat(xAxis.tickFormat()) //exposing x2Axis so user can set differently
.ticks( availableWidth / 100 )
.tickSize(-availableHeight2, 0);
@ -3627,7 +3627,7 @@ nv.models.lineWithFocusChart = function() {
y2Axis
.tickFormat(yAxis.tickFormat())
//.tickFormat(yAxis.tickFormat()) //exposing y2Axis so user can set differently
.ticks( availableHeight2 / 36 )
.tickSize( -availableWidth, 0);
@ -7277,4 +7277,4 @@ nv.models.stackedAreaChart = function() {
return chart;
}
})();
})();

6
nv.d3.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -158,7 +158,7 @@ nv.models.lineWithFocusChart = function() {
x2Axis
.tickFormat(xAxis.tickFormat()) //TODO: make sure everythign set on the Axes is set on both x and x2, and y and y2 respectively
//.tickFormat(xAxis.tickFormat()) //exposing x2Axis so user can set differently
.ticks( availableWidth / 100 )
.tickSize(-availableHeight2, 0);
@ -169,7 +169,7 @@ nv.models.lineWithFocusChart = function() {
y2Axis
.tickFormat(yAxis.tickFormat())
//.tickFormat(yAxis.tickFormat()) //exposing y2Axis so user can set differently
.ticks( availableHeight2 / 36 )
.tickSize( -availableWidth, 0);
@ -289,6 +289,8 @@ nv.models.lineWithFocusChart = function() {
chart.legend = legend;
chart.xAxis = xAxis;
chart.yAxis = yAxis;
chart.x2Axis = x2Axis;
chart.y2Axis = y2Axis;
d3.rebind(chart, lines, 'x', 'y', 'size', 'xDomain', 'yDomain', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');