|
|
@@ -355,12 +355,12 @@ export default class StockHeatmap extends React.Component {
|
|
|
this.drawingContext.lineTo(this.defaults.hmWidth(), 0);
|
|
|
this.drawingContext.textAlign = 'center';
|
|
|
this.drawingContext.textBaseline = 'top';
|
|
|
- const assumedTextWidth = this.drawingContext.measureText('77:77:77').width + 20;
|
|
|
- const maxTickInterval = this.defaults.hmWidth() / assumedTextWidth;
|
|
|
- const bandInterval = Math.max(1, Math.floor(maxTickInterval));
|
|
|
+ // const assumedTextWidth = this.drawingContext.measureText('77:77:77').width + 20;
|
|
|
+ // const maxTickInterval = this.defaults.hmWidth() / assumedTextWidth;
|
|
|
+ const bandInterval = Math.max(1, parseInt(this.windowedData.length / 18));
|
|
|
// console.log('bandInterval=', bandInterval);
|
|
|
this.windowedData.map((d, i) => {
|
|
|
- if (i % bandInterval === 0) {
|
|
|
+ if (i !=0 && i % bandInterval === 0) {
|
|
|
let x = this.xScale(d.ts);
|
|
|
this.drawingContext.moveTo(x, 0);
|
|
|
this.drawingContext.lineTo(x, this.defaults.axisTickSize);
|