Skip to content

Commit

Permalink
Exposing axisTimeCombinations in tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
Golodhros committed Nov 25, 2020
1 parent ebd0a7f commit 928a135
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/charts/tooltip/Tooltip.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
import React from 'react';
import PropTypes from 'prop-types';
import tooltip from './tooltipChart';
import { axisTimeCombinations as combinations } from '../constants';

const tooltipContainerWithMarkerSelector = '.metadata-group .vertical-marker-container';
const tooltipContainerSelector = '.metadata-group';


export default class Tooltip extends React.Component {
static propTypes = {
/**
* Exposes the constants to be used to force the x axis to respect a
* certain granularity current options: MINUTE_HOUR, HOUR_DAY, DAY_MONTH, MONTH_YEAR
*/
axisTimeCombinations: PropTypes.number,

/**
* Exposes the ability to use a custom date format
Expand Down Expand Up @@ -286,3 +282,9 @@ export default class Tooltip extends React.Component {
);
}
}

/**
* Exposes the constants to be used to force the x axis to respect a
* certain granularity current options: MINUTE_HOUR, HOUR_DAY, DAY_MONTH, MONTH_YEAR
*/
export const axisTimeCombinations = combinations;

0 comments on commit 928a135

Please sign in to comment.