import { Series } from '../../../../common/types' ; export function formatKey ( key , series ) { if ( series . label && /{{\s*key\s*}}/ . test ( series . label ) ) { return series . label . replace ( /{{\s*key\s*}}/ , key ) ; } return key ; }