UNPKG

plotly.js

Version:

The open source javascript graphing library that powers plotly

29 lines (23 loc) 735 B
/** * Copyright 2012-2020, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; var Lib = require('../../lib'); module.exports = function handleLabelDefaults(coerce, layout, lineColor, opts) { if(!opts) opts = {}; var showLabels = coerce('contours.showlabels'); if(showLabels) { var globalFont = layout.font; Lib.coerceFont(coerce, 'contours.labelfont', { family: globalFont.family, size: globalFont.size, color: lineColor }); coerce('contours.labelformat'); } if(opts.hasHover !== false) coerce('zhoverformat'); };