PageSourceSearch

https://www.destination-angers.com/app/dist/destination-angers-tou…/es-modules/Series/Pie/PieSeriesDefaults.js

js destination-angers.com collected 2026-10-02 06:23:20 UTC 24,060 bytes, 675 lines download raw bytes

1/* *
2 *
3 *  (c) 2010-2024 Torstein Honsi
4 *
5 *  License: www.highcharts.com/license
6 *
7 *  !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
8 *
9 * */
10'use strict';
11/* *
12 *
13 *  API Options
14 *
15 * */
16/**
17 * A pie chart is a circular graphic which is divided into slices to
18 * illustrate numerical proportion.
19 *
20 * @sample highcharts/demo/pie-chart/
21 *         Pie chart
22 *
23 * @extends      plotOptions.line
24 * @excluding    animationLimit, boostThreshold, connectEnds, connectNulls,
25 *               cropThreshold, dashStyle, dataSorting, dragDrop,
26 *               findNearestPointBy, getExtremesFromAll, label, lineWidth,
27 *               linkedTo, marker, negativeColor, pointInterval,
28 *               pointIntervalUnit, pointPlacement, pointStart,
29 *               softThreshold, stacking, step, threshold, turboThreshold,
30 *               zoneAxis, zones, dataSorting, boostBlending
31 * @product      highcharts highmaps
32 * @optionparent plotOptions.pie
33 *
34 * @private
35 */
36const PieSeriesDefaults = {
37    /**
38     * The corner radius of the border surrounding each slice. A number
39     * signifies pixels. A percentage string, like for example `50%`, signifies
40     * a size relative to the radius and the inner radius.
41     *
42     * @sample  highcharts/plotoptions/series-border-radius
43     *          Column and pie with rounded border
44     *
45     * @since   11.0.0
46     *
47     * @type      {number|string|Highcharts.BorderRadiusOptionsObject}
48     */
49    borderRadius: 3,
50    /**
51     * @excluding legendItemClick
52     * @apioption plotOptions.pie.events
53     */
54    /**
55     * Fires when the checkbox next to the point name in the legend is
56     * clicked. One parameter, event, is passed to the function. The state
57     * of the checkbox is found by event.checked. The checked item is found
58     * by event.item. Return false to prevent the default action which is to
59     * toggle the select state of the series.
60     *
61     * @sample {highcharts} highcharts/plotoptions/series-events-checkboxclick/
62     *         Alert checkbox status
63     *
64     * @type      {Function}
65     * @since     1.2.0
66     * @product   highcharts highmaps
67     * @context   Highcharts.Point
68     * @apioption plotOptions.pie.events.checkboxClick
69     */
70    /**
71     * Fires when the legend item belonging to the pie point (slice) is
72     * clicked. The `this` keyword refers to the point itself. One
73     * parameter, `event`, is passed to the function, containing common
74     * event information. The default action is to toggle the visibility of
75     * the point. This can be prevented by calling `event.preventDefault()`.
76     *
77     *  **Note:** This option is deprecated in favor of
78     * [legend.events.itemClick](#legend.events.itemClick).
79     *
80     * @deprecated 11.4.4
81     * @type       {Highcharts.PointLegendItemClickCallbackFunction}
82     * @since      1.2.0
83     * @product    highcharts highmaps
84     * @apioption  plotOptions.pie.point.events.legendItemClick
85     */
86    /**
87     * The center of the pie chart relative to the plot area. Can be
88     * percentages or pixel values. The default behaviour (as of 3.0) is to
89     * center the pie so that all slices and data labels are within the plot
90     * area. As a consequence, the pie may actually jump around in a chart
91     * with dynamic values, as the data labels move. In that case, the
92     * center should be explicitly set, for example to `["50%", "50%"]`.
93     *
94     * @sample {highcharts} highcharts/plotoptions/pie-center/
95     *         Centered at 100, 100
96     *
97     * @type    {Array<(number|string|null),(number|string|null)>}
98     * @default [null, null]
99     * @product highcharts highmaps
100     *
101     * @private
102     */
103    center: [null, null],
104    /**
105     * The color of the pie series. A pie series is represented as an empty
106     * circle if the total sum of its values is 0. Use this property to
107     * define the color of its border.
108     *
109     * In styled mode, the color can be defined by the
110     * [colorIndex](#plotOptions.series.colorIndex) option. Also, the series
111     * color can be set with the `.highcharts-series`,
112     * `.highcharts-color-{n}`, `.highcharts-{type}-series` or
113     * `.highcharts-series-{n}` class, or individual classes given by the
114     * `className` option.
115     *
116     * @sample {highcharts} highcharts/plotoptions/pie-emptyseries/
117     *         Empty pie series
118     *
119     * @type      {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
120     * @default   ${palette.neutralColor20}
121     * @apioption plotOptions.pie.color
122     */
123    /**
124     * @product highcharts
125     *
126     * @private
127     */
128    clip: false,
129    /**
130     * @ignore-option
131     *
132     * @private
133     */
134    colorByPoint: true, // Always true for pies
135    /**
136     * A series specific or series type specific color set to use instead
137     * of the global [colors](#colors).
138     *
139     * @sample {highcharts} highcharts/demo/pie-monochrome/
140     *         Set default colors for all pies
141     *
142     * @type      {Array<Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject>}
143     * @since     3.0
144     * @product   highcharts highmaps
145     * @apioption plotOptions.pie.colors
146     */
147    /**
148     * @declare   Highcharts.SeriesPieDataLabelsOptionsObject
149     * @extends   plotOptions.series.dataLabels
150     * @excluding align, allowOverlap, inside, staggerLines, step
151     * @private
152     */
153    dataLabels: {
154        /**
155         * Alignment method for data labels. Possible values are:
156         *
157         * - `plotEdges`: Each label touches the nearest vertical edge of
158         *   the plot area.
159         *
160         * - `connectors`: Connectors have the same x position and the
161         *   widest label of each half (left & right) touches the nearest
162         *   vertical edge of the plot area.
163         *
164         * @sample {highcharts} highcharts/plotoptions/pie-datalabels-alignto-connectors/
165         *         alignTo: connectors
166         * @sample {highcharts} highcharts/plotoptions/pie-datalabels-alignto-plotedges/
167         *         alignTo: plotEdges
168         *
169         * @type      {string}
170         * @since     7.0.0
171         * @product   highcharts highmaps
172         * @apioption plotOptions.pie.dataLabels.alignTo
173         */
174        /**
175         * The color of the line connecting the data label to the pie slice.
176         * The default color is the same as the point's color.
177         *
178         * In styled mode, the connector stroke is given in the
179         * `.highcharts-data-label-connector` class.
180         *
181         * @sample {highcharts} highcharts/plotoptions/pie-datalabels-connectorcolor/
182         *         Blue connectors
183         * @sample {highcharts} highcharts/css/pie-point/
184         *         Styled connectors
185         *
186         * @type      {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
187         * @since     2.1
188         * @product   highcharts highmaps
189         * @apioption plotOptions.pie.dataLabels.connectorColor
190         */
191        /**
192         * The distance from the data label to the connector. Note that
193         * data labels also have a default `padding`, so in order for the
194         * connector to touch the text, the `padding` must also be 0.
195         *
196         * @sample {highcharts} highcharts/plotoptions/pie-datalabels-connectorpadding/
197         *         No padding
198         *
199         * @since   2.1
200         * @product highcharts highmaps
201         */
202        connectorPadding: 5,
203        /**
204         * Specifies the method that is used to generate the connector path.
205         * Highcharts provides 3 built-in connector shapes: `'crookedLine'`
206         * (default since v11), `'fixedOffset'` and `'straight'`.
207         *
208         * Users can provide their own method by passing a function instead of a
209         * string. Three arguments are passed to the callback:
210         *
211         * - An object that holds the information about the coordinates of the
212         *   label (`x` & `y` properties) and how the label is located in
213         *   relation to the pie (`alignment` property). `alignment` can by one
214         *   of the following: `'left'` (pie on the left side of the data
215         *   label), `'right'` (pie on the right side of the data label) or
216         *   `'center'` (data label overlaps the pie).
217         *
218         * - An object that holds the information about the position of the
219         *   connector. Its `touchingSliceAt`  porperty tells the position of
220         *   the place where the connector touches the slice.
221         *
222         * - Data label options
223         *
224         * The function has to return an SVG path definition in array form (see
225         * the example).
226         *
227         * @sample {highcharts}
228         *         highcharts/plotoptions/pie-datalabels-connectorshape-string/
229         *         connectorShape is a String
230         * @sample {highcharts}
231         *         highcharts/plotoptions/pie-datalabels-connectorshape-function/
232         *         connectorShape is a function
233         *
234         * @type    {string|Function}
235         * @since   7.0.0
236         * @product highcharts highmaps
237         */
238        connectorShape: 'crookedLine',
239        /**
240         * The width of the line connecting the data label to the pie slice.
241         *
242         * In styled mode, the connector stroke width is given in the
243         * `.highcharts-data-label-connector` class.
244         *
245         * @sample {highcharts} highcharts/plotoptions/pie-datalabels-connectorwidth-disabled/
246         *         Disable the connector
247         * @sample {highcharts} highcharts/css/pie-point/
248         *         Styled connectors
249         *
250         * @type      {number}
251         * @default   1
252         * @since     2.1
253         * @product   highcharts highmaps
254         * @apioption plotOptions.pie.dataLabels.connectorWidth
255         */
256        /**
257         * Works only if `connectorShape` is `'crookedLine'`. It defines how
258         * far from the vertical plot edge the coonnector path should be
259         * crooked. With the default, `undefined`, the crook is placed so that
260         * the horizontal line from the label intersects with the radial line
261         * extending through the center of the pie slice.
262         *
263         * @sample {highcharts} highcharts/plotoptions/pie-datalabels-crookdistance/
264         *         crookDistance set to 90%
265         *
266         * @since   7.0.0
267         * @product highcharts highmaps
268         */
269        crookDistance: void 0,
270        /**
271         * The distance of the data label from the pie's edge. Negative
272         * numbers put the data label on top of the pie slices. Can also be
273         * defined as a percentage of pie's radius. Connectors are only
274         * shown for data labels outside the pie.
275         *
276         * @sample {highcharts} highcharts/plotoptions/pie-datalabels-distance/
277         *         Data labels on top of the pie
278         *
279         * @type    {number|string}
280         * @since   2.1
281         * @product highcharts highmaps
282         */
283        distance: 30,
284        enabled: true,
285        /**
286         * A
287         * [format string](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting)
288         * for the data label. Available variables are the same as for
289         * `formatter`.
290         *
291         * @sample {highcharts} highcharts/plotoptions/series-datalabels-format/
292         *         Add a unit
293         *
294         * @type      {string}
295         * @default   undefined
296         * @since     3.0
297         * @apioption plotOptions.pie.dataLabels.format
298         */
299        // eslint-disable-next-line valid-jsdoc
300        /**
301         * Callback JavaScript function to format the data label. Note that
302         * if a `format` is defined, the format takes precedence and the
303         * formatter is ignored.
304         *
305         * @type {Highcharts.DataLabelsFormatterCallbackFunction}
306         * @default function () { return this.point.isNull ? void 0 : this.point.name; }
307         */
308        formatter: function () {
309            return this.isNull ? void 0 : this.name;
310        },
311        /**
312         * Whether to render the connector as a soft arc or a line with a sharp
313         * break. Works only if `connectorShape` equals to `fixedOffset`.
314         *
315         * @sample {highcharts}
316         *         highcharts/plotoptions/pie-datalabels-softconnector-true/
317         *         Soft
318         * @sample {highcharts}
319         *         highcharts/plotoptions/pie-datalabels-softconnector-false/
320         *         Non soft
321         *
322         * @since   2.1.7
323         * @product highcharts highmaps
324         */
325        softConnector: true,
326        /**
327         * @sample {highcharts} highcharts/plotoptions/pie-datalabels-overflow
328         *         Long labels truncated with an ellipsis
329         * @sample {highcharts} highcharts/plotoptions/pie-datalabels-overflow-wrap
330         *         Long labels are wrapped
331         *
332         * @type      {Highcharts.CSSObject}
333         * @apioption plotOptions.pie.dataLabels.style
334         */
335        x: 0
336    },
337    /**
338     * If the total sum of the pie's values is 0, the series is represented
339     * as an empty circle . The `fillColor` option defines the color of that
340     * circle. Use [pie.borderWidth](#plotOptions.pie.borderWidth) to set
341     * the border thickness.
342     *
343     * @sample {highcharts} highcharts/plotoptions/pie-emptyseries/
344     *         Empty pie series
345     *
346     * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
347     * @private
348     */
349    fillColor: void 0,
350    /**
351     * The end angle of the pie in degrees where 0 is top and 90 is right.
352     * Defaults to `startAngle` plus 360.
353     *
354     * @sample {highcharts} highcharts/demo/pie-semi-circle/
355     *         Semi-circle donut
356     *
357     * @type      {number}
358     * @since     1.3.6
359     * @product   highcharts highmaps
360     * @apioption plotOptions.pie.endAngle
361     */
362    /**
363     * Thickness describing the ring size for a donut type chart,
364     * overriding [innerSize](#plotOptions.pie.innerSize).
365     *
366     * @type      {number}
367     * @default   undefined
368     * @product   highcharts
369     * @since 10.1.0
370     * @apioption plotOptions.pie.thickness
371     * @private
372     */
373    /**
374     * Equivalent to [chart.ignoreHiddenSeries](#chart.ignoreHiddenSeries),
375     * this option tells whether the series shall be redrawn as if the
376     * hidden point were `null`.
377     *
378     * The default value changed from `false` to `true` with Highcharts
379     * 3.0.
380     *
381     * @sample {highcharts} highcharts/plotoptions/pie-ignorehiddenpoint/
382     *         True, the hiddden point is ignored
383     *
384     * @since   2.3.0
385     * @product highcharts highmaps
386     *
387     * @private
388     */
389    ignoreHiddenPoint: true,
390    /**
391     * @default   true
392     * @extends   plotOptions.series.inactiveOtherPoints
393     * @private
394     */
395    inactiveOtherPoints: true,
396    /**
397     * The size of the inner diameter for the pie. A size greater than 0
398     * renders a donut chart. Can be a percentage or pixel value.
399     * Percentages are relative to the pie size. Pixel values are given as
400     * integers. Setting overridden by thickness.
401     *
402     *
403     * Note: in Highcharts < 4.1.2, the percentage was relative to the plot
404     * area, not the pie size.
405     *
406     * @sample {highcharts} highcharts/plotoptions/pie-innersize-80px/
407     *         80px inner size
408     * @sample {highcharts} highcharts/plotoptions/pie-innersize-50percent/
409     *         50% of the plot area
410     * @sample {highcharts} highcharts/demo/3d-pie-donut/
411     *         3D donut
412     *
413     * @type      {number|string}
414     * @default   0
415     * @since     2.0
416     * @product   highcharts highmaps
417     * @apioption plotOptions.pie.innerSize
418     */
419    /**
420     * @ignore-option
421     *
422     * @private
423     */
424    legendType: 'point',
425    /**
426     * @ignore-option
427     *
428     * @private
429     */
430    marker: null, // Point options are specified in the base options
431    /**
432     * The minimum size for a pie in response to auto margins. The pie will
433     * try to shrink to make room for data labels in side the plot area,
434     *  but only to this size.
435     *
436     * @type      {number|string}
437     * @default   80
438     * @since     3.0
439     * @product   highcharts highmaps
440     * @apioption plotOptions.pie.minSize
441     */
442    /**
443     * The diameter of the pie relative to the plot area. Can be a
444     * percentage or pixel value. Pixel values are given as integers. The
445     * default behaviour (as of 3.0) is to scale to the plot area and give
446     * room for data labels within the plot area.
447     * [slicedOffset](#plotOptions.pie.slicedOffset) is also included in the
448     * default size calculation. As a consequence, the size of the pie may
449     * vary when points are updated and data labels more around. In that
450     * case it is best to set a fixed value, for example `"75%"`.
451     *
452     * @sample {highcharts} highcharts/plotoptions/pie-size/
453     *         Smaller pie
454     *
455     * @type    {number|string|null}
456     * @product highcharts highmaps
457     *
458     * @private
459     */
460    size: null,
461    /**
462     * Whether to display this particular series or series type in the
463     * legend. Since 2.1, pies are not shown in the legend by default.
464     *
465     * @sample {highcharts} highcharts/plotoptions/series-showinlegend/
466     *         One series in the legend, one hidden
467     *
468     * @product highcharts highmaps
469     *
470     * @private
471     */
472    showInLegend: false,
473    /**
474     * If a point is sliced, moved out from the center, how many pixels
475     * should it be moved?.
476     *
477     * @sample {highcharts} highcharts/plotoptions/pie-slicedoffset-20/
478     *         20px offset
479     *
480     * @product highcharts highmaps
481     *
482     * @private
483     */
484    slicedOffset: 10,
485    /**
486     * The start angle of the pie slices in degrees where 0 is top and 90
487     * right.
488     *
489     * @sample {highcharts} highcharts/plotoptions/pie-startangle-90/
490     *         Start from right
491     *
492     * @type      {number}
493     * @default   0
494     * @since     2.3.4
495     * @product   highcharts highmaps
496     * @apioption plotOptions.pie.startAngle
497     */
498    /**
499     * Sticky tracking of mouse events. When true, the `mouseOut` event
500     * on a series isn't triggered until the mouse moves over another
501     * series, or out of the plot area. When false, the `mouseOut` event on
502     * a series is triggered when the mouse leaves the area around the
503     * series'  graph or markers. This also implies the tooltip. When
504     * `stickyTracking` is false and `tooltip.shared` is false, the tooltip
505     * will be hidden when moving the mouse between series.
506     *
507     * @product highcharts highmaps
508     *
509     * @private
510     */
511    stickyTracking: false,
512    tooltip: {
513        followPointer: true
514    },
515    /**
516     * The color of the border surrounding each slice. When `null`, the
517     * border takes the same color as the slice fill. This can be used
518     * together with a `borderWidth` to fill drawing gaps created by
519     * antialiazing artefacts in borderless pies.
520     *
521     * In styled mode, the border stroke is given in the `.highcharts-point`
522     * class.
523     *
524     * @sample {highcharts} highcharts/plotoptions/pie-bordercolor-black/
525     *         Black border
526     *
527     * @type    {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
528     * @default #ffffff
529     * @product highcharts highmaps
530     *
531     * @private
532     */
533    borderColor: "#ffffff" /* Palette.backgroundColor */,
534    /**
535     * The width of the border surrounding each slice.
536     *
537     * When setting the border width to 0, there may be small gaps between
538     * the slices due to SVG antialiasing artefacts. To work around this,
539     * keep the border width at 0.5 or 1, but set the `borderColor` to
540     * `null` instead.
541     *
542     * In styled mode, the border stroke width is given in the
543     * `.highcharts-point` class.
544     *
545     * @sample {highcharts} highcharts/plotoptions/pie-borderwidth/
546     *         3px border
547     *
548     * @product highcharts highmaps
549     *
550     * @private
551     */
552    borderWidth: 1,
553    /**
554     * @ignore-option
555     * @private
556     */
557    lineWidth: void 0, // #12222
558    states: {
559        /**
560         * @extends   plotOptions.series.states.hover
561         * @excluding marker, lineWidth, lineWidthPlus
562         * @product   highcharts highmaps
563         */
564        hover: {
565            /**
566             * How much to brighten the point on interaction. Requires the
567             * main color to be defined in hex or rgb(a) format.
568             *
569             * In styled mode, the hover brightness is by default replaced
570             * by a fill-opacity given in the `.highcharts-point-hover`
571             * class.
572             *
573             * @sample {highcharts} highcharts/plotoptions/pie-states-hover-brightness/
574             *         Brightened by 0.5
575             *
576             * @product highcharts highmaps
577             */
578            brightness: 0.1
579        }
580    }
581};
582/**
583 * A `pie` series. If the [type](#series.pie.type) option is not specified,
584 * it is inherited from [chart.type](#chart.type).
585 *
586 * @extends   series,plotOptions.pie
587 * @excluding cropThreshold, dataParser, dataURL, linkedTo, stack, xAxis, yAxis,
588 *            dataSorting, step, boostThreshold, boostBlending
589 * @product   highcharts highmaps
590 * @apioption series.pie
591 */
592/**
593 * An array of data points for the series. For the `pie` series type,
594 * points can be given in the following ways:
595 *
596 * 1. An array of numerical values. In this case, the numerical values will be
597 *    interpreted as `y` options. Example:
598 *    ```js
599 *    data: [0, 5, 3, 5]
600 *    ```
601 *
602 * 2. An array of objects with named values. The following snippet shows only a
603 *    few settings, see the complete options set below. If the total number of
604 *    data points exceeds the series'
605 *    [turboThreshold](#series.pie.turboThreshold),
606 *    this option is not available.
607 *    ```js
608 *    data: [{
609 *        y: 1,
610 *        name: "Point2",
611 *        color: "#00FF00"
612 *    }, {
613 *        y: 7,
614 *        name: "Point1",
615 *        color: "#FF00FF"
616 *    }]
617 *    ```
618 *
619 * @sample {highcharts} highcharts/chart/reflow-true/
620 *         Numerical values
621 * @sample {highcharts} highcharts/series/data-array-of-arrays/
622 *         Arrays of numeric x and y
623 * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/
624 *         Arrays of datetime x and y
625 * @sample {highcharts} highcharts/series/data-array-of-name-value/
626 *         Arrays of point.name and y
627 * @sample {highcharts} highcharts/series/data-array-of-objects/
628 *         Config objects
629 *
630 * @type      {Array<number|Array<string,(number|null)>|null|*>}
631 * @extends   series.line.data
632 * @excluding marker, x
633 * @product   highcharts highmaps
634 * @apioption series.pie.data
635 */
636/**
637 * @type      {Highcharts.SeriesPieDataLabelsOptionsObject}
638 * @product   highcharts highmaps
639 * @apioption series.pie.data.dataLabels
640 */
641/**
642 * The sequential index of the data point in the legend.
643 *
644 * @type      {number}
645 * @product   highcharts highmaps
646 * @apioption series.pie.data.legendIndex
647 */
648/**
649 * Whether to display a slice offset from the center.
650 *
651 * @sample {highcharts} highcharts/point/sliced/
652 *         One sliced point
653 *
654 * @type      {boolean}
655 * @product   highcharts highmaps
656 * @apioption series.pie.data.sliced
657 */
658/**
659 * @extends plotOptions.pie.dataLabels
660 * @excluding align, allowOverlap, inside, staggerLines, step
661 * @product   highcharts highmaps
662 * @apioption series.pie.dataLabels
663 */
664/**
665 * @excluding legendItemClick
666 * @product   highcharts highmaps
667 * @apioption series.pie.events
668 */
669''; // Placeholder for transpiled doclets above
670/* *
671 *
672 *  Default Export
673 *
674 * */
675export default PieSeriesDefaults;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.