ZSJ_BCY_Web/lib/hcharts/Highcharts/5.0.6/js/modules/series-label.src.js

(开头部分) 23KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/**
 * @license Highcharts JS v5.0.6 (2016-12-07)
 *
 * (c) 2009-2016 Torstein Honsi
 *
 * License: www.highcharts.com/license
 */
(function(factory) {
    if (typeof module === 'object' && module.exports) {
        module.exports = factory;
    } else {
        factory(Highcharts);
    }
}(function(Highcharts) {
    (function(H) {
        /**
         * (c) 2009-2016 Torstein Honsi
         *
         * License: www.highcharts.com/license
         */
        /**
         * EXPERIMENTAL Highcharts module to place labels next to a series in a natural position.
         *
         * TODO:
         * - add column support (box collision detection, boxesToAvoid logic)
         * - other series types, area etc.
         * - avoid data labels, when data labels above, show series label below.
         * - add more options (connector, format, formatter)
         * 
         * http://jsfiddle.net/highcharts/L2u9rpwr/
         * http://jsfiddle.net/highcharts/y5A37/
         * http://jsfiddle.net/highcharts/264Nm/
         * http://jsfiddle.net/highcharts/y5A37/
         */

        'use strict';

        var labelDistance = 3,
            wrap = H.wrap,
            each = H.each,
            extend = H.extend,
            isNumber = H.isNumber,
            Series = H.Series,
            SVGRenderer = H.SVGRenderer,
            Chart = H.Chart;

        H.setOptions({
            plotOptions: {
                series: {
                    label: {
                        enabled: true,
                        // Allow labels to be placed distant to the graph if necessary, and
                        // draw a connector line to the graph
                        connectorAllowed: true,
                        connectorNeighbourDistance: 24, // If the label is closer than this to a neighbour graph, draw a connector
                        styles: {
                            fontWeight: 'bold'
                        }
                        // boxesToAvoid: []
                    }
后面还有 546 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。