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:
parent
affd81b0a4
commit
cc95d977d8
@ -54,9 +54,13 @@ nv.addGraph(function() {
|
|||||||
|
|
||||||
chart.xAxis
|
chart.xAxis
|
||||||
.tickFormat(d3.format(',f'));
|
.tickFormat(d3.format(',f'));
|
||||||
|
chart.x2Axis
|
||||||
|
.tickFormat(d3.format(',f'));
|
||||||
|
|
||||||
chart.yAxis
|
chart.yAxis
|
||||||
.tickFormat(d3.format(',.2f'));
|
.tickFormat(d3.format(',.2f'));
|
||||||
|
chart.yA2xis
|
||||||
|
.tickFormat(d3.format(',.2f'));
|
||||||
|
|
||||||
d3.select('#chart svg')
|
d3.select('#chart svg')
|
||||||
.datum(testData())
|
.datum(testData())
|
||||||
|
4
nv.d3.js
4
nv.d3.js
@ -3616,7 +3616,7 @@ nv.models.lineWithFocusChart = function() {
|
|||||||
|
|
||||||
|
|
||||||
x2Axis
|
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 )
|
.ticks( availableWidth / 100 )
|
||||||
.tickSize(-availableHeight2, 0);
|
.tickSize(-availableHeight2, 0);
|
||||||
|
|
||||||
@ -3627,7 +3627,7 @@ nv.models.lineWithFocusChart = function() {
|
|||||||
|
|
||||||
|
|
||||||
y2Axis
|
y2Axis
|
||||||
.tickFormat(yAxis.tickFormat())
|
//.tickFormat(yAxis.tickFormat()) //exposing y2Axis so user can set differently
|
||||||
.ticks( availableHeight2 / 36 )
|
.ticks( availableHeight2 / 36 )
|
||||||
.tickSize( -availableWidth, 0);
|
.tickSize( -availableWidth, 0);
|
||||||
|
|
||||||
|
6
nv.d3.min.js
vendored
6
nv.d3.min.js
vendored
File diff suppressed because one or more lines are too long
@ -158,7 +158,7 @@ nv.models.lineWithFocusChart = function() {
|
|||||||
|
|
||||||
|
|
||||||
x2Axis
|
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 )
|
.ticks( availableWidth / 100 )
|
||||||
.tickSize(-availableHeight2, 0);
|
.tickSize(-availableHeight2, 0);
|
||||||
|
|
||||||
@ -169,7 +169,7 @@ nv.models.lineWithFocusChart = function() {
|
|||||||
|
|
||||||
|
|
||||||
y2Axis
|
y2Axis
|
||||||
.tickFormat(yAxis.tickFormat())
|
//.tickFormat(yAxis.tickFormat()) //exposing y2Axis so user can set differently
|
||||||
.ticks( availableHeight2 / 36 )
|
.ticks( availableHeight2 / 36 )
|
||||||
.tickSize( -availableWidth, 0);
|
.tickSize( -availableWidth, 0);
|
||||||
|
|
||||||
@ -289,6 +289,8 @@ nv.models.lineWithFocusChart = function() {
|
|||||||
chart.legend = legend;
|
chart.legend = legend;
|
||||||
chart.xAxis = xAxis;
|
chart.xAxis = xAxis;
|
||||||
chart.yAxis = yAxis;
|
chart.yAxis = yAxis;
|
||||||
|
chart.x2Axis = x2Axis;
|
||||||
|
chart.y2Axis = y2Axis;
|
||||||
|
|
||||||
d3.rebind(chart, lines, 'x', 'y', 'size', 'xDomain', 'yDomain', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
|
d3.rebind(chart, lines, 'x', 'y', 'size', 'xDomain', 'yDomain', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user