Skip to content
This repository was archived by the owner on Aug 31, 2026. It is now read-only.

Commit 7f8c2c1

Browse files
committed
CFD update to work around highcharts bug and smarter yAxis control
1 parent 53e2d99 commit 7f8c2c1

152 files changed

Lines changed: 44663 additions & 13996 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

deploy/cfd-min.html

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,21 @@
291291
},
292292
unselect: function (event) {
293293
alert('Unselect rows')
294-
}
294+
}
295295
}
296-
}
296+
},
297+
events: {
298+
legendItemClick: function(event) {
299+
if (this.chart.series.length == this.index + 1) {
300+
if (!this.visible) {
301+
this.chart.yAxis[0].setExtremes(cfdCalculation.lowestValueInLastState);
302+
} else {
303+
this.chart.yAxis[0].setExtremes(0);
304+
};
305+
};
306+
return true;
307+
}
308+
}
297309
}
298310
},
299311
series: cfdCalculation.series

deploy/cfd.html

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,21 @@
291291
},
292292
unselect: function (event) {
293293
alert('Unselect rows')
294-
}
294+
}
295295
}
296-
}
296+
},
297+
events: {
298+
legendItemClick: function(event) {
299+
if (this.chart.series.length == this.index + 1) {
300+
if (!this.visible) {
301+
this.chart.yAxis[0].setExtremes(cfdCalculation.lowestValueInLastState);
302+
} else {
303+
this.chart.yAxis[0].setExtremes(0);
304+
};
305+
};
306+
return true;
307+
}
308+
}
297309
}
298310
},
299311
series: cfdCalculation.series

examples/cfd.html

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,21 @@
282282
},
283283
unselect: function (event) {
284284
alert('Unselect rows')
285-
}
285+
}
286286
}
287-
}
287+
},
288+
events: {
289+
legendItemClick: function(event) {
290+
if (this.chart.series.length == this.index + 1) {
291+
if (!this.visible) {
292+
this.chart.yAxis[0].setExtremes(cfdCalculation.lowestValueInLastState);
293+
} else {
294+
this.chart.yAxis[0].setExtremes(0);
295+
};
296+
};
297+
return true;
298+
}
299+
}
288300
}
289301
},
290302
series: cfdCalculation.series
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)