Options.js 141 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721
  1. /* *
  2. *
  3. * (c) 2010-2020 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. import H from './Globals.js';
  12. /**
  13. * @typedef {"plotBox"|"spacingBox"} Highcharts.ButtonRelativeToValue
  14. */
  15. /**
  16. * Gets fired when a series is added to the chart after load time, using the
  17. * `addSeries` method. Returning `false` prevents the series from being added.
  18. *
  19. * @callback Highcharts.ChartAddSeriesCallbackFunction
  20. *
  21. * @param {Highcharts.Chart} this
  22. * The chart on which the event occured.
  23. *
  24. * @param {Highcharts.ChartAddSeriesEventObject} event
  25. * The event that occured.
  26. */
  27. /**
  28. * Contains common event information. Through the `options` property you can
  29. * access the series options that were passed to the `addSeries` method.
  30. *
  31. * @interface Highcharts.ChartAddSeriesEventObject
  32. */ /**
  33. * The series options that were passed to the `addSeries` method.
  34. * @name Highcharts.ChartAddSeriesEventObject#options
  35. * @type {Highcharts.SeriesOptionsType}
  36. */ /**
  37. * Prevents the default behaviour of the event.
  38. * @name Highcharts.ChartAddSeriesEventObject#preventDefault
  39. * @type {Function}
  40. */ /**
  41. * The event target.
  42. * @name Highcharts.ChartAddSeriesEventObject#target
  43. * @type {Highcharts.Chart}
  44. */ /**
  45. * The event type.
  46. * @name Highcharts.ChartAddSeriesEventObject#type
  47. * @type {"addSeries"}
  48. */
  49. /**
  50. * Gets fired when clicking on the plot background.
  51. *
  52. * @callback Highcharts.ChartClickCallbackFunction
  53. *
  54. * @param {Highcharts.Chart} this
  55. * The chart on which the event occured.
  56. *
  57. * @param {Highcharts.PointerEventObject} event
  58. * The event that occured.
  59. */
  60. /**
  61. * Contains an axes of the clicked spot.
  62. *
  63. * @interface Highcharts.ChartClickEventAxisObject
  64. */ /**
  65. * Axis at the clicked spot.
  66. * @name Highcharts.ChartClickEventAxisObject#axis
  67. * @type {Highcharts.Axis}
  68. */ /**
  69. * Axis value at the clicked spot.
  70. * @name Highcharts.ChartClickEventAxisObject#value
  71. * @type {number}
  72. */
  73. /**
  74. * Contains information about the clicked spot on the chart. Remember the unit
  75. * of a datetime axis is milliseconds since 1970-01-01 00:00:00.
  76. *
  77. * @interface Highcharts.ChartClickEventObject
  78. * @extends Highcharts.PointerEventObject
  79. */ /**
  80. * Information about the x-axis on the clicked spot.
  81. * @name Highcharts.ChartClickEventObject#xAxis
  82. * @type {Array<Highcharts.ChartClickEventAxisObject>}
  83. */ /**
  84. * Information about the y-axis on the clicked spot.
  85. * @name Highcharts.ChartClickEventObject#yAxis
  86. * @type {Array<Highcharts.ChartClickEventAxisObject>}
  87. */ /**
  88. * Information about the z-axis on the clicked spot.
  89. * @name Highcharts.ChartClickEventObject#zAxis
  90. * @type {Array<Highcharts.ChartClickEventAxisObject>|undefined}
  91. */
  92. /**
  93. * Gets fired when the chart is finished loading.
  94. *
  95. * @callback Highcharts.ChartLoadCallbackFunction
  96. *
  97. * @param {Highcharts.Chart} this
  98. * The chart on which the event occured.
  99. *
  100. * @param {global.Event} event
  101. * The event that occured.
  102. */
  103. /**
  104. * Fires when the chart is redrawn, either after a call to `chart.redraw()` or
  105. * after an axis, series or point is modified with the `redraw` option set to
  106. * `true`.
  107. *
  108. * @callback Highcharts.ChartRedrawCallbackFunction
  109. *
  110. * @param {Highcharts.Chart} this
  111. * The chart on which the event occured.
  112. *
  113. * @param {global.Event} event
  114. * The event that occured.
  115. */
  116. /**
  117. * Gets fired after initial load of the chart (directly after the `load` event),
  118. * and after each redraw (directly after the `redraw` event).
  119. *
  120. * @callback Highcharts.ChartRenderCallbackFunction
  121. *
  122. * @param {Highcharts.Chart} this
  123. * The chart on which the event occured.
  124. *
  125. * @param {global.Event} event
  126. * The event that occured.
  127. */
  128. /**
  129. * Gets fired when an area of the chart has been selected. The default action
  130. * for the selection event is to zoom the chart to the selected area. It can be
  131. * prevented by calling `event.preventDefault()` or return false.
  132. *
  133. * @callback Highcharts.ChartSelectionCallbackFunction
  134. *
  135. * @param {Highcharts.Chart} this
  136. * The chart on which the event occured.
  137. *
  138. * @param {global.ChartSelectionContextObject} event
  139. * Event informations
  140. *
  141. * @return {boolean|undefined}
  142. * Return false to prevent the default action, usually zoom.
  143. */
  144. /**
  145. * The primary axes are `xAxis[0]` and `yAxis[0]`. Remember the unit of a
  146. * datetime axis is milliseconds since 1970-01-01 00:00:00.
  147. *
  148. * @interface Highcharts.ChartSelectionContextObject
  149. * @extends global.Event
  150. */ /**
  151. * Arrays containing the axes of each dimension and each axis' min and max
  152. * values.
  153. * @name Highcharts.ChartSelectionContextObject#xAxis
  154. * @type {Array<Highcharts.ChartSelectionAxisContextObject>}
  155. */ /**
  156. * Arrays containing the axes of each dimension and each axis' min and max
  157. * values.
  158. * @name Highcharts.ChartSelectionContextObject#yAxis
  159. * @type {Array<Highcharts.ChartSelectionAxisContextObject>}
  160. */
  161. /**
  162. * Axis context of the selection.
  163. *
  164. * @interface Highcharts.ChartSelectionAxisContextObject
  165. */ /**
  166. * The selected Axis.
  167. * @name Highcharts.ChartSelectionAxisContextObject#axis
  168. * @type {Highcharts.Axis}
  169. */ /**
  170. * The maximum axis value, either automatic or set manually.
  171. * @name Highcharts.ChartSelectionAxisContextObject#max
  172. * @type {number}
  173. */ /**
  174. * The minimum axis value, either automatic or set manually.
  175. * @name Highcharts.ChartSelectionAxisContextObject#min
  176. * @type {number}
  177. */
  178. import Time from './Time.js';
  179. import Color from './Color.js';
  180. var color = Color.parse;
  181. import U from './Utilities.js';
  182. var merge = U.merge;
  183. var isTouchDevice = H.isTouchDevice, svg = H.svg;
  184. /* ************************************************************************** *
  185. * Handle the options *
  186. * ************************************************************************** */
  187. /**
  188. * Global default settings.
  189. *
  190. * @name Highcharts.defaultOptions
  191. * @type {Highcharts.Options}
  192. */ /**
  193. * @optionparent
  194. */
  195. H.defaultOptions = {
  196. /**
  197. * An array containing the default colors for the chart's series. When
  198. * all colors are used, new colors are pulled from the start again.
  199. *
  200. * Default colors can also be set on a series or series.type basis,
  201. * see [column.colors](#plotOptions.column.colors),
  202. * [pie.colors](#plotOptions.pie.colors).
  203. *
  204. * In styled mode, the colors option doesn't exist. Instead, colors
  205. * are defined in CSS and applied either through series or point class
  206. * names, or through the [chart.colorCount](#chart.colorCount) option.
  207. *
  208. *
  209. * ### Legacy
  210. *
  211. * In Highcharts 3.x, the default colors were:
  212. * ```js
  213. * colors: ['#2f7ed8', '#0d233a', '#8bbc21', '#910000', '#1aadce',
  214. * '#492970', '#f28f43', '#77a1e5', '#c42525', '#a6c96a']
  215. * ```
  216. *
  217. * In Highcharts 2.x, the default colors were:
  218. * ```js
  219. * colors: ['#4572A7', '#AA4643', '#89A54E', '#80699B', '#3D96AE',
  220. * '#DB843D', '#92A8CD', '#A47D7C', '#B5CA92']
  221. * ```
  222. *
  223. * @sample {highcharts} highcharts/chart/colors/
  224. * Assign a global color theme
  225. *
  226. * @type {Array<Highcharts.ColorString>}
  227. * @default ["#7cb5ec", "#434348", "#90ed7d", "#f7a35c", "#8085e9",
  228. * "#f15c80", "#e4d354", "#2b908f", "#f45b5b", "#91e8e1"]
  229. */
  230. colors: '#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1'.split(' '),
  231. /**
  232. * Styled mode only. Configuration object for adding SVG definitions for
  233. * reusable elements. See [gradients, shadows and
  234. * patterns](https://www.highcharts.com/docs/chart-design-and-style/gradients-shadows-and-patterns)
  235. * for more information and code examples.
  236. *
  237. * @type {*}
  238. * @since 5.0.0
  239. * @apioption defs
  240. */
  241. /**
  242. * @ignore-option
  243. */
  244. symbols: ['circle', 'diamond', 'square', 'triangle', 'triangle-down'],
  245. /**
  246. * The language object is global and it can't be set on each chart
  247. * initialization. Instead, use `Highcharts.setOptions` to set it before any
  248. * chart is initialized.
  249. *
  250. * ```js
  251. * Highcharts.setOptions({
  252. * lang: {
  253. * months: [
  254. * 'Janvier', 'Février', 'Mars', 'Avril',
  255. * 'Mai', 'Juin', 'Juillet', 'Août',
  256. * 'Septembre', 'Octobre', 'Novembre', 'Décembre'
  257. * ],
  258. * weekdays: [
  259. * 'Dimanche', 'Lundi', 'Mardi', 'Mercredi',
  260. * 'Jeudi', 'Vendredi', 'Samedi'
  261. * ]
  262. * }
  263. * });
  264. * ```
  265. */
  266. lang: {
  267. /**
  268. * The loading text that appears when the chart is set into the loading
  269. * state following a call to `chart.showLoading`.
  270. */
  271. loading: 'Loading...',
  272. /**
  273. * An array containing the months names. Corresponds to the `%B` format
  274. * in `Highcharts.dateFormat()`.
  275. *
  276. * @type {Array<string>}
  277. * @default ["January", "February", "March", "April", "May", "June",
  278. * "July", "August", "September", "October", "November",
  279. * "December"]
  280. */
  281. months: [
  282. 'January', 'February', 'March', 'April', 'May', 'June', 'July',
  283. 'August', 'September', 'October', 'November', 'December'
  284. ],
  285. /**
  286. * An array containing the months names in abbreviated form. Corresponds
  287. * to the `%b` format in `Highcharts.dateFormat()`.
  288. *
  289. * @type {Array<string>}
  290. * @default ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
  291. * "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
  292. */
  293. shortMonths: [
  294. 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul',
  295. 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
  296. ],
  297. /**
  298. * An array containing the weekday names.
  299. *
  300. * @type {Array<string>}
  301. * @default ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
  302. * "Friday", "Saturday"]
  303. */
  304. weekdays: [
  305. 'Sunday', 'Monday', 'Tuesday', 'Wednesday',
  306. 'Thursday', 'Friday', 'Saturday'
  307. ],
  308. /**
  309. * Short week days, starting Sunday. If not specified, Highcharts uses
  310. * the first three letters of the `lang.weekdays` option.
  311. *
  312. * @sample highcharts/lang/shortweekdays/
  313. * Finnish two-letter abbreviations
  314. *
  315. * @type {Array<string>}
  316. * @since 4.2.4
  317. * @apioption lang.shortWeekdays
  318. */
  319. /**
  320. * What to show in a date field for invalid dates. Defaults to an empty
  321. * string.
  322. *
  323. * @type {string}
  324. * @since 4.1.8
  325. * @product highcharts highstock
  326. * @apioption lang.invalidDate
  327. */
  328. /**
  329. * The title appearing on hovering the zoom in button. The text itself
  330. * defaults to "+" and can be changed in the button options.
  331. *
  332. * @type {string}
  333. * @default Zoom in
  334. * @product highmaps
  335. * @apioption lang.zoomIn
  336. */
  337. /**
  338. * The title appearing on hovering the zoom out button. The text itself
  339. * defaults to "-" and can be changed in the button options.
  340. *
  341. * @type {string}
  342. * @default Zoom out
  343. * @product highmaps
  344. * @apioption lang.zoomOut
  345. */
  346. /**
  347. * The default decimal point used in the `Highcharts.numberFormat`
  348. * method unless otherwise specified in the function arguments.
  349. *
  350. * @since 1.2.2
  351. */
  352. decimalPoint: '.',
  353. /**
  354. * [Metric prefixes](https://en.wikipedia.org/wiki/Metric_prefix) used
  355. * to shorten high numbers in axis labels. Replacing any of the
  356. * positions with `null` causes the full number to be written. Setting
  357. * `numericSymbols` to `null` disables shortening altogether.
  358. *
  359. * @sample {highcharts} highcharts/lang/numericsymbols/
  360. * Replacing the symbols with text
  361. * @sample {highstock} highcharts/lang/numericsymbols/
  362. * Replacing the symbols with text
  363. *
  364. * @type {Array<string>}
  365. * @default ["k", "M", "G", "T", "P", "E"]
  366. * @since 2.3.0
  367. */
  368. numericSymbols: ['k', 'M', 'G', 'T', 'P', 'E'],
  369. /**
  370. * The magnitude of [numericSymbols](#lang.numericSymbol) replacements.
  371. * Use 10000 for Japanese, Korean and various Chinese locales, which
  372. * use symbols for 10^4, 10^8 and 10^12.
  373. *
  374. * @sample highcharts/lang/numericsymbolmagnitude/
  375. * 10000 magnitude for Japanese
  376. *
  377. * @type {number}
  378. * @default 1000
  379. * @since 5.0.3
  380. * @apioption lang.numericSymbolMagnitude
  381. */
  382. /**
  383. * The text for the label appearing when a chart is zoomed.
  384. *
  385. * @since 1.2.4
  386. */
  387. resetZoom: 'Reset zoom',
  388. /**
  389. * The tooltip title for the label appearing when a chart is zoomed.
  390. *
  391. * @since 1.2.4
  392. */
  393. resetZoomTitle: 'Reset zoom level 1:1',
  394. /**
  395. * The default thousands separator used in the `Highcharts.numberFormat`
  396. * method unless otherwise specified in the function arguments. Defaults
  397. * to a single space character, which is recommended in
  398. * [ISO 31-0](https://en.wikipedia.org/wiki/ISO_31-0#Numbers) and works
  399. * across Anglo-American and continental European languages.
  400. *
  401. * @default \u0020
  402. * @since 1.2.2
  403. */
  404. thousandsSep: ' '
  405. },
  406. /**
  407. * Global options that don't apply to each chart. These options, like
  408. * the `lang` options, must be set using the `Highcharts.setOptions`
  409. * method.
  410. *
  411. * ```js
  412. * Highcharts.setOptions({
  413. * global: {
  414. * useUTC: false
  415. * }
  416. * });
  417. * ```
  418. */
  419. /**
  420. * _Canvg rendering for Android 2.x is removed as of Highcharts 5.0\.
  421. * Use the [libURL](#exporting.libURL) option to configure exporting._
  422. *
  423. * The URL to the additional file to lazy load for Android 2.x devices.
  424. * These devices don't support SVG, so we download a helper file that
  425. * contains [canvg](https://github.com/canvg/canvg), its dependency
  426. * rbcolor, and our own CanVG Renderer class. To avoid hotlinking to
  427. * our site, you can install canvas-tools.js on your own server and
  428. * change this option accordingly.
  429. *
  430. * @deprecated
  431. *
  432. * @type {string}
  433. * @default https://code.highcharts.com/{version}/modules/canvas-tools.js
  434. * @product highcharts highmaps
  435. * @apioption global.canvasToolsURL
  436. */
  437. /**
  438. * This option is deprecated since v6.0.5. Instead, use
  439. * [time.useUTC](#time.useUTC) that supports individual time settings
  440. * per chart.
  441. *
  442. * @deprecated
  443. *
  444. * @type {boolean}
  445. * @apioption global.useUTC
  446. */
  447. /**
  448. * This option is deprecated since v6.0.5. Instead, use
  449. * [time.Date](#time.Date) that supports individual time settings
  450. * per chart.
  451. *
  452. * @deprecated
  453. *
  454. * @type {Function}
  455. * @product highcharts highstock
  456. * @apioption global.Date
  457. */
  458. /**
  459. * This option is deprecated since v6.0.5. Instead, use
  460. * [time.getTimezoneOffset](#time.getTimezoneOffset) that supports
  461. * individual time settings per chart.
  462. *
  463. * @deprecated
  464. *
  465. * @type {Function}
  466. * @product highcharts highstock
  467. * @apioption global.getTimezoneOffset
  468. */
  469. /**
  470. * This option is deprecated since v6.0.5. Instead, use
  471. * [time.timezone](#time.timezone) that supports individual time
  472. * settings per chart.
  473. *
  474. * @deprecated
  475. *
  476. * @type {string}
  477. * @product highcharts highstock
  478. * @apioption global.timezone
  479. */
  480. /**
  481. * This option is deprecated since v6.0.5. Instead, use
  482. * [time.timezoneOffset](#time.timezoneOffset) that supports individual
  483. * time settings per chart.
  484. *
  485. * @deprecated
  486. *
  487. * @type {number}
  488. * @product highcharts highstock
  489. * @apioption global.timezoneOffset
  490. */
  491. global: {},
  492. /**
  493. * Time options that can apply globally or to individual charts. These
  494. * settings affect how `datetime` axes are laid out, how tooltips are
  495. * formatted, how series
  496. * [pointIntervalUnit](#plotOptions.series.pointIntervalUnit) works and how
  497. * the Highstock range selector handles time.
  498. *
  499. * The common use case is that all charts in the same Highcharts object
  500. * share the same time settings, in which case the global settings are set
  501. * using `setOptions`.
  502. *
  503. * ```js
  504. * // Apply time settings globally
  505. * Highcharts.setOptions({
  506. * time: {
  507. * timezone: 'Europe/London'
  508. * }
  509. * });
  510. * // Apply time settings by instance
  511. * var chart = Highcharts.chart('container', {
  512. * time: {
  513. * timezone: 'America/New_York'
  514. * },
  515. * series: [{
  516. * data: [1, 4, 3, 5]
  517. * }]
  518. * });
  519. *
  520. * // Use the Time object
  521. * console.log(
  522. * 'Current time in New York',
  523. * chart.time.dateFormat('%Y-%m-%d %H:%M:%S', Date.now())
  524. * );
  525. * ```
  526. *
  527. * Since v6.0.5, the time options were moved from the `global` obect to the
  528. * `time` object, and time options can be set on each individual chart.
  529. *
  530. * @sample {highcharts|highstock}
  531. * highcharts/time/timezone/
  532. * Set the timezone globally
  533. * @sample {highcharts}
  534. * highcharts/time/individual/
  535. * Set the timezone per chart instance
  536. * @sample {highstock}
  537. * stock/time/individual/
  538. * Set the timezone per chart instance
  539. *
  540. * @since 6.0.5
  541. * @optionparent time
  542. */
  543. time: {
  544. /**
  545. * A custom `Date` class for advanced date handling. For example,
  546. * [JDate](https://github.com/tahajahangir/jdate) can be hooked in to
  547. * handle Jalali dates.
  548. *
  549. * @type {*}
  550. * @since 4.0.4
  551. * @product highcharts highstock gantt
  552. */
  553. Date: void 0,
  554. /**
  555. * A callback to return the time zone offset for a given datetime. It
  556. * takes the timestamp in terms of milliseconds since January 1 1970,
  557. * and returns the timezone offset in minutes. This provides a hook
  558. * for drawing time based charts in specific time zones using their
  559. * local DST crossover dates, with the help of external libraries.
  560. *
  561. * @see [global.timezoneOffset](#global.timezoneOffset)
  562. *
  563. * @sample {highcharts|highstock} highcharts/time/gettimezoneoffset/
  564. * Use moment.js to draw Oslo time regardless of browser locale
  565. *
  566. * @type {Highcharts.TimezoneOffsetCallbackFunction}
  567. * @since 4.1.0
  568. * @product highcharts highstock gantt
  569. */
  570. getTimezoneOffset: void 0,
  571. /**
  572. * Requires [moment.js](https://momentjs.com/). If the timezone option
  573. * is specified, it creates a default
  574. * [getTimezoneOffset](#time.getTimezoneOffset) function that looks
  575. * up the specified timezone in moment.js. If moment.js is not included,
  576. * this throws a Highcharts error in the console, but does not crash the
  577. * chart.
  578. *
  579. * @see [getTimezoneOffset](#time.getTimezoneOffset)
  580. *
  581. * @sample {highcharts|highstock} highcharts/time/timezone/
  582. * Europe/Oslo
  583. *
  584. * @type {string}
  585. * @since 5.0.7
  586. * @product highcharts highstock gantt
  587. */
  588. timezone: void 0,
  589. /**
  590. * The timezone offset in minutes. Positive values are west, negative
  591. * values are east of UTC, as in the ECMAScript
  592. * [getTimezoneOffset](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset)
  593. * method. Use this to display UTC based data in a predefined time zone.
  594. *
  595. * @see [time.getTimezoneOffset](#time.getTimezoneOffset)
  596. *
  597. * @sample {highcharts|highstock} highcharts/time/timezoneoffset/
  598. * Timezone offset
  599. *
  600. * @since 3.0.8
  601. * @product highcharts highstock gantt
  602. */
  603. timezoneOffset: 0,
  604. /**
  605. * Whether to use UTC time for axis scaling, tickmark placement and
  606. * time display in `Highcharts.dateFormat`. Advantages of using UTC
  607. * is that the time displays equally regardless of the user agent's
  608. * time zone settings. Local time can be used when the data is loaded
  609. * in real time or when correct Daylight Saving Time transitions are
  610. * required.
  611. *
  612. * @sample {highcharts} highcharts/time/useutc-true/
  613. * True by default
  614. * @sample {highcharts} highcharts/time/useutc-false/
  615. * False
  616. */
  617. useUTC: true
  618. },
  619. /**
  620. * General options for the chart.
  621. */
  622. chart: {
  623. /**
  624. * Default `mapData` for all series. If set to a string, it functions
  625. * as an index into the `Highcharts.maps` array. Otherwise it is
  626. * interpreted as map data.
  627. *
  628. * @see [mapData](#series.map.mapData)
  629. *
  630. * @sample maps/demo/geojson
  631. * Loading geoJSON data
  632. * @sample maps/chart/topojson
  633. * Loading topoJSON converted to geoJSON
  634. *
  635. * @type {string|Array<*>|Highcharts.GeoJSON}
  636. * @since 5.0.0
  637. * @product highmaps
  638. * @apioption chart.map
  639. */
  640. /**
  641. * Set lat/lon transformation definitions for the chart. If not defined,
  642. * these are extracted from the map data.
  643. *
  644. * @type {*}
  645. * @since 5.0.0
  646. * @product highmaps
  647. * @apioption chart.mapTransforms
  648. */
  649. /**
  650. * When using multiple axis, the ticks of two or more opposite axes
  651. * will automatically be aligned by adding ticks to the axis or axes
  652. * with the least ticks, as if `tickAmount` were specified.
  653. *
  654. * This can be prevented by setting `alignTicks` to false. If the grid
  655. * lines look messy, it's a good idea to hide them for the secondary
  656. * axis by setting `gridLineWidth` to 0.
  657. *
  658. * If `startOnTick` or `endOnTick` in an Axis options are set to false,
  659. * then the `alignTicks ` will be disabled for the Axis.
  660. *
  661. * Disabled for logarithmic axes.
  662. *
  663. * @sample {highcharts} highcharts/chart/alignticks-true/
  664. * True by default
  665. * @sample {highcharts} highcharts/chart/alignticks-false/
  666. * False
  667. * @sample {highstock} stock/chart/alignticks-true/
  668. * True by default
  669. * @sample {highstock} stock/chart/alignticks-false/
  670. * False
  671. *
  672. * @type {boolean}
  673. * @default true
  674. * @product highcharts highstock gantt
  675. * @apioption chart.alignTicks
  676. */
  677. /**
  678. * Set the overall animation for all chart updating. Animation can be
  679. * disabled throughout the chart by setting it to false here. It can
  680. * be overridden for each individual API method as a function parameter.
  681. * The only animation not affected by this option is the initial series
  682. * animation, see [plotOptions.series.animation](
  683. * #plotOptions.series.animation).
  684. *
  685. * The animation can either be set as a boolean or a configuration
  686. * object. If `true`, it will use the 'swing' jQuery easing and a
  687. * duration of 500 ms. If used as a configuration object, the following
  688. * properties are supported:
  689. *
  690. * - `defer`: The animation delay time in milliseconds.
  691. *
  692. * - `duration`: The duration of the animation in milliseconds.
  693. *
  694. * - `easing`: A string reference to an easing function set on the
  695. * `Math` object. See
  696. * [the easing demo](https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/series-animation-easing/).
  697. *
  698. * When zooming on a series with less than 100 points, the chart redraw
  699. * will be done with animation, but in case of more data points, it is
  700. * necessary to set this option to ensure animation on zoom.
  701. *
  702. * @sample {highcharts} highcharts/chart/animation-none/
  703. * Updating with no animation
  704. * @sample {highcharts} highcharts/chart/animation-duration/
  705. * With a longer duration
  706. * @sample {highcharts} highcharts/chart/animation-easing/
  707. * With a jQuery UI easing
  708. * @sample {highmaps} maps/chart/animation-none/
  709. * Updating with no animation
  710. * @sample {highmaps} maps/chart/animation-duration/
  711. * With a longer duration
  712. *
  713. * @type {boolean|Partial<Highcharts.AnimationOptionsObject>}
  714. * @default undefined
  715. * @apioption chart.animation
  716. */
  717. /**
  718. * A CSS class name to apply to the charts container `div`, allowing
  719. * unique CSS styling for each chart.
  720. *
  721. * @type {string}
  722. * @apioption chart.className
  723. */
  724. /**
  725. * Event listeners for the chart.
  726. *
  727. * @apioption chart.events
  728. */
  729. /**
  730. * Fires when a series is added to the chart after load time, using the
  731. * `addSeries` method. One parameter, `event`, is passed to the
  732. * function, containing common event information. Through
  733. * `event.options` you can access the series options that were passed to
  734. * the `addSeries` method. Returning false prevents the series from
  735. * being added.
  736. *
  737. * @sample {highcharts} highcharts/chart/events-addseries/
  738. * Alert on add series
  739. * @sample {highstock} stock/chart/events-addseries/
  740. * Alert on add series
  741. *
  742. * @type {Highcharts.ChartAddSeriesCallbackFunction}
  743. * @since 1.2.0
  744. * @context Highcharts.Chart
  745. * @apioption chart.events.addSeries
  746. */
  747. /**
  748. * Fires when clicking on the plot background. One parameter, `event`,
  749. * is passed to the function, containing common event information.
  750. *
  751. * Information on the clicked spot can be found through `event.xAxis`
  752. * and `event.yAxis`, which are arrays containing the axes of each
  753. * dimension and each axis' value at the clicked spot. The primary axes
  754. * are `event.xAxis[0]` and `event.yAxis[0]`. Remember the unit of a
  755. * datetime axis is milliseconds since 1970-01-01 00:00:00.
  756. *
  757. * ```js
  758. * click: function(e) {
  759. * console.log(
  760. * Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', e.xAxis[0].value),
  761. * e.yAxis[0].value
  762. * )
  763. * }
  764. * ```
  765. *
  766. * @sample {highcharts} highcharts/chart/events-click/
  767. * Alert coordinates on click
  768. * @sample {highcharts} highcharts/chart/events-container/
  769. * Alternatively, attach event to container
  770. * @sample {highstock} stock/chart/events-click/
  771. * Alert coordinates on click
  772. * @sample {highstock} highcharts/chart/events-container/
  773. * Alternatively, attach event to container
  774. * @sample {highmaps} maps/chart/events-click/
  775. * Record coordinates on click
  776. * @sample {highmaps} highcharts/chart/events-container/
  777. * Alternatively, attach event to container
  778. *
  779. * @type {Highcharts.ChartClickCallbackFunction}
  780. * @since 1.2.0
  781. * @context Highcharts.Chart
  782. * @apioption chart.events.click
  783. */
  784. /**
  785. * Fires when the chart is finished loading. Since v4.2.2, it also waits
  786. * for images to be loaded, for example from point markers. One
  787. * parameter, `event`, is passed to the function, containing common
  788. * event information.
  789. *
  790. * There is also a second parameter to the chart constructor where a
  791. * callback function can be passed to be executed on chart.load.
  792. *
  793. * @sample {highcharts} highcharts/chart/events-load/
  794. * Alert on chart load
  795. * @sample {highstock} stock/chart/events-load/
  796. * Alert on chart load
  797. * @sample {highmaps} maps/chart/events-load/
  798. * Add series on chart load
  799. *
  800. * @type {Highcharts.ChartLoadCallbackFunction}
  801. * @context Highcharts.Chart
  802. * @apioption chart.events.load
  803. */
  804. /**
  805. * Fires when the chart is redrawn, either after a call to
  806. * `chart.redraw()` or after an axis, series or point is modified with
  807. * the `redraw` option set to `true`. One parameter, `event`, is passed
  808. * to the function, containing common event information.
  809. *
  810. * @sample {highcharts} highcharts/chart/events-redraw/
  811. * Alert on chart redraw
  812. * @sample {highstock} stock/chart/events-redraw/
  813. * Alert on chart redraw when adding a series or moving the
  814. * zoomed range
  815. * @sample {highmaps} maps/chart/events-redraw/
  816. * Set subtitle on chart redraw
  817. *
  818. * @type {Highcharts.ChartRedrawCallbackFunction}
  819. * @since 1.2.0
  820. * @context Highcharts.Chart
  821. * @apioption chart.events.redraw
  822. */
  823. /**
  824. * Fires after initial load of the chart (directly after the `load`
  825. * event), and after each redraw (directly after the `redraw` event).
  826. *
  827. * @type {Highcharts.ChartRenderCallbackFunction}
  828. * @since 5.0.7
  829. * @context Highcharts.Chart
  830. * @apioption chart.events.render
  831. */
  832. /**
  833. * Fires when an area of the chart has been selected. Selection is
  834. * enabled by setting the chart's zoomType. One parameter, `event`, is
  835. * passed to the function, containing common event information. The
  836. * default action for the selection event is to zoom the chart to the
  837. * selected area. It can be prevented by calling
  838. * `event.preventDefault()` or return false.
  839. *
  840. * Information on the selected area can be found through `event.xAxis`
  841. * and `event.yAxis`, which are arrays containing the axes of each
  842. * dimension and each axis' min and max values. The primary axes are
  843. * `event.xAxis[0]` and `event.yAxis[0]`. Remember the unit of a
  844. * datetime axis is milliseconds since 1970-01-01 00:00:00.
  845. *
  846. * ```js
  847. * selection: function(event) {
  848. * // log the min and max of the primary, datetime x-axis
  849. * console.log(
  850. * Highcharts.dateFormat(
  851. * '%Y-%m-%d %H:%M:%S',
  852. * event.xAxis[0].min
  853. * ),
  854. * Highcharts.dateFormat(
  855. * '%Y-%m-%d %H:%M:%S',
  856. * event.xAxis[0].max
  857. * )
  858. * );
  859. * // log the min and max of the y axis
  860. * console.log(event.yAxis[0].min, event.yAxis[0].max);
  861. * }
  862. * ```
  863. *
  864. * @sample {highcharts} highcharts/chart/events-selection/
  865. * Report on selection and reset
  866. * @sample {highcharts} highcharts/chart/events-selection-points/
  867. * Select a range of points through a drag selection
  868. * @sample {highstock} stock/chart/events-selection/
  869. * Report on selection and reset
  870. * @sample {highstock} highcharts/chart/events-selection-points/
  871. * Select a range of points through a drag selection
  872. * (Highcharts)
  873. *
  874. * @type {Highcharts.ChartSelectionCallbackFunction}
  875. * @apioption chart.events.selection
  876. */
  877. /**
  878. * The margin between the outer edge of the chart and the plot area.
  879. * The numbers in the array designate top, right, bottom and left
  880. * respectively. Use the options `marginTop`, `marginRight`,
  881. * `marginBottom` and `marginLeft` for shorthand setting of one option.
  882. *
  883. * By default there is no margin. The actual space is dynamically
  884. * calculated from the offset of axis labels, axis title, title,
  885. * subtitle and legend in addition to the `spacingTop`, `spacingRight`,
  886. * `spacingBottom` and `spacingLeft` options.
  887. *
  888. * @sample {highcharts} highcharts/chart/margins-zero/
  889. * Zero margins
  890. * @sample {highstock} stock/chart/margin-zero/
  891. * Zero margins
  892. *
  893. * @type {number|Array<number>}
  894. * @apioption chart.margin
  895. */
  896. /**
  897. * The margin between the bottom outer edge of the chart and the plot
  898. * area. Use this to set a fixed pixel value for the margin as opposed
  899. * to the default dynamic margin. See also `spacingBottom`.
  900. *
  901. * @sample {highcharts} highcharts/chart/marginbottom/
  902. * 100px bottom margin
  903. * @sample {highstock} stock/chart/marginbottom/
  904. * 100px bottom margin
  905. * @sample {highmaps} maps/chart/margin/
  906. * 100px margins
  907. *
  908. * @type {number}
  909. * @since 2.0
  910. * @apioption chart.marginBottom
  911. */
  912. /**
  913. * The margin between the left outer edge of the chart and the plot
  914. * area. Use this to set a fixed pixel value for the margin as opposed
  915. * to the default dynamic margin. See also `spacingLeft`.
  916. *
  917. * @sample {highcharts} highcharts/chart/marginleft/
  918. * 150px left margin
  919. * @sample {highstock} stock/chart/marginleft/
  920. * 150px left margin
  921. * @sample {highmaps} maps/chart/margin/
  922. * 100px margins
  923. *
  924. * @type {number}
  925. * @since 2.0
  926. * @apioption chart.marginLeft
  927. */
  928. /**
  929. * The margin between the right outer edge of the chart and the plot
  930. * area. Use this to set a fixed pixel value for the margin as opposed
  931. * to the default dynamic margin. See also `spacingRight`.
  932. *
  933. * @sample {highcharts} highcharts/chart/marginright/
  934. * 100px right margin
  935. * @sample {highstock} stock/chart/marginright/
  936. * 100px right margin
  937. * @sample {highmaps} maps/chart/margin/
  938. * 100px margins
  939. *
  940. * @type {number}
  941. * @since 2.0
  942. * @apioption chart.marginRight
  943. */
  944. /**
  945. * The margin between the top outer edge of the chart and the plot area.
  946. * Use this to set a fixed pixel value for the margin as opposed to
  947. * the default dynamic margin. See also `spacingTop`.
  948. *
  949. * @sample {highcharts} highcharts/chart/margintop/ 100px top margin
  950. * @sample {highstock} stock/chart/margintop/
  951. * 100px top margin
  952. * @sample {highmaps} maps/chart/margin/
  953. * 100px margins
  954. *
  955. * @type {number}
  956. * @since 2.0
  957. * @apioption chart.marginTop
  958. */
  959. /**
  960. * Callback function to override the default function that formats all
  961. * the numbers in the chart. Returns a string with the formatted number.
  962. *
  963. * @sample highcharts/members/highcharts-numberformat
  964. * Arabic digits in Highcharts
  965. * @type {Highcharts.NumberFormatterCallbackFunction}
  966. * @since 8.0.0
  967. * @apioption chart.numberFormatter
  968. */
  969. /**
  970. * Allows setting a key to switch between zooming and panning. Can be
  971. * one of `alt`, `ctrl`, `meta` (the command key on Mac and Windows
  972. * key on Windows) or `shift`. The keys are mapped directly to the key
  973. * properties of the click event argument (`event.altKey`,
  974. * `event.ctrlKey`, `event.metaKey` and `event.shiftKey`).
  975. *
  976. * @type {string}
  977. * @since 4.0.3
  978. * @product highcharts gantt
  979. * @validvalue ["alt", "ctrl", "meta", "shift"]
  980. * @apioption chart.panKey
  981. */
  982. /**
  983. * Allow panning in a chart. Best used with [panKey](#chart.panKey)
  984. * to combine zooming and panning.
  985. *
  986. * On touch devices, when the [tooltip.followTouchMove](
  987. * #tooltip.followTouchMove) option is `true` (default), panning
  988. * requires two fingers. To allow panning with one finger, set
  989. * `followTouchMove` to `false`.
  990. *
  991. * @sample {highcharts} highcharts/chart/pankey/ Zooming and panning
  992. * @sample {highstock} stock/chart/panning/ Zooming and xy panning
  993. *
  994. * @product highcharts highstock gantt
  995. * @apioption chart.panning
  996. */
  997. /**
  998. * Enable or disable chart panning.
  999. *
  1000. * @type {boolean}
  1001. * @default {highcharts} false
  1002. * @default {highstock} true
  1003. * @apioption chart.panning.enabled
  1004. */
  1005. /**
  1006. * Decides in what dimensions the user can pan the chart. Can be
  1007. * one of `x`, `y`, or `xy`.
  1008. *
  1009. * @sample {highcharts} highcharts/chart/panning-type
  1010. * Zooming and xy panning
  1011. *
  1012. * @type {string}
  1013. * @validvalue ["x", "y", "xy"]
  1014. * @default x
  1015. * @apioption chart.panning.type
  1016. */
  1017. /**
  1018. * Equivalent to [zoomType](#chart.zoomType), but for multitouch
  1019. * gestures only. By default, the `pinchType` is the same as the
  1020. * `zoomType` setting. However, pinching can be enabled separately in
  1021. * some cases, for example in stock charts where a mouse drag pans the
  1022. * chart, while pinching is enabled. When [tooltip.followTouchMove](
  1023. * #tooltip.followTouchMove) is true, pinchType only applies to
  1024. * two-finger touches.
  1025. *
  1026. * @type {string}
  1027. * @default {highcharts} undefined
  1028. * @default {highstock} x
  1029. * @since 3.0
  1030. * @product highcharts highstock gantt
  1031. * @validvalue ["x", "y", "xy"]
  1032. * @apioption chart.pinchType
  1033. */
  1034. /**
  1035. * Whether to apply styled mode. When in styled mode, no presentational
  1036. * attributes or CSS are applied to the chart SVG. Instead, CSS rules
  1037. * are required to style the chart. The default style sheet is
  1038. * available from `https://code.highcharts.com/css/highcharts.css`.
  1039. *
  1040. * @type {boolean}
  1041. * @default false
  1042. * @since 7.0
  1043. * @apioption chart.styledMode
  1044. */
  1045. styledMode: false,
  1046. /**
  1047. * The corner radius of the outer chart border.
  1048. *
  1049. * @sample {highcharts} highcharts/chart/borderradius/
  1050. * 20px radius
  1051. * @sample {highstock} stock/chart/border/
  1052. * 10px radius
  1053. * @sample {highmaps} maps/chart/border/
  1054. * Border options
  1055. *
  1056. */
  1057. borderRadius: 0,
  1058. /**
  1059. * In styled mode, this sets how many colors the class names
  1060. * should rotate between. With ten colors, series (or points) are
  1061. * given class names like `highcharts-color-0`, `highcharts-color-0`
  1062. * [...] `highcharts-color-9`. The equivalent in non-styled mode
  1063. * is to set colors using the [colors](#colors) setting.
  1064. *
  1065. * @since 5.0.0
  1066. */
  1067. colorCount: 10,
  1068. /**
  1069. * Alias of `type`.
  1070. *
  1071. * @sample {highcharts} highcharts/chart/defaultseriestype/
  1072. * Bar
  1073. *
  1074. * @deprecated
  1075. *
  1076. * @product highcharts
  1077. */
  1078. defaultSeriesType: 'line',
  1079. /**
  1080. * If true, the axes will scale to the remaining visible series once
  1081. * one series is hidden. If false, hiding and showing a series will
  1082. * not affect the axes or the other series. For stacks, once one series
  1083. * within the stack is hidden, the rest of the stack will close in
  1084. * around it even if the axis is not affected.
  1085. *
  1086. * @sample {highcharts} highcharts/chart/ignorehiddenseries-true/
  1087. * True by default
  1088. * @sample {highcharts} highcharts/chart/ignorehiddenseries-false/
  1089. * False
  1090. * @sample {highcharts} highcharts/chart/ignorehiddenseries-true-stacked/
  1091. * True with stack
  1092. * @sample {highstock} stock/chart/ignorehiddenseries-true/
  1093. * True by default
  1094. * @sample {highstock} stock/chart/ignorehiddenseries-false/
  1095. * False
  1096. *
  1097. * @since 1.2.0
  1098. * @product highcharts highstock gantt
  1099. */
  1100. ignoreHiddenSeries: true,
  1101. /**
  1102. * Whether to invert the axes so that the x axis is vertical and y axis
  1103. * is horizontal. When `true`, the x axis is [reversed](#xAxis.reversed)
  1104. * by default.
  1105. *
  1106. * @productdesc {highcharts}
  1107. * If a bar series is present in the chart, it will be inverted
  1108. * automatically. Inverting the chart doesn't have an effect if there
  1109. * are no cartesian series in the chart, or if the chart is
  1110. * [polar](#chart.polar).
  1111. *
  1112. * @sample {highcharts} highcharts/chart/inverted/
  1113. * Inverted line
  1114. * @sample {highstock} stock/navigator/inverted/
  1115. * Inverted stock chart
  1116. *
  1117. * @type {boolean}
  1118. * @default false
  1119. * @product highcharts highstock gantt
  1120. * @apioption chart.inverted
  1121. */
  1122. /**
  1123. * The distance between the outer edge of the chart and the content,
  1124. * like title or legend, or axis title and labels if present. The
  1125. * numbers in the array designate top, right, bottom and left
  1126. * respectively. Use the options spacingTop, spacingRight, spacingBottom
  1127. * and spacingLeft options for shorthand setting of one option.
  1128. *
  1129. * @type {Array<number>}
  1130. * @see [chart.margin](#chart.margin)
  1131. * @default [10, 10, 15, 10]
  1132. * @since 3.0.6
  1133. */
  1134. spacing: [10, 10, 15, 10],
  1135. /**
  1136. * The button that appears after a selection zoom, allowing the user
  1137. * to reset zoom.
  1138. */
  1139. resetZoomButton: {
  1140. /**
  1141. * What frame the button placement should be related to. Can be
  1142. * either `plotBox` or `spacingBox`.
  1143. *
  1144. * @sample {highcharts} highcharts/chart/resetzoombutton-relativeto/
  1145. * Relative to the chart
  1146. * @sample {highstock} highcharts/chart/resetzoombutton-relativeto/
  1147. * Relative to the chart
  1148. *
  1149. * @type {Highcharts.ButtonRelativeToValue}
  1150. * @default plot
  1151. * @since 2.2
  1152. * @apioption chart.resetZoomButton.relativeTo
  1153. */
  1154. /**
  1155. * A collection of attributes for the button. The object takes SVG
  1156. * attributes like `fill`, `stroke`, `stroke-width` or `r`, the
  1157. * border radius. The theme also supports `style`, a collection of
  1158. * CSS properties for the text. Equivalent attributes for the hover
  1159. * state are given in `theme.states.hover`.
  1160. *
  1161. * @sample {highcharts} highcharts/chart/resetzoombutton-theme/
  1162. * Theming the button
  1163. * @sample {highstock} highcharts/chart/resetzoombutton-theme/
  1164. * Theming the button
  1165. *
  1166. * @type {Highcharts.SVGAttributes}
  1167. * @since 2.2
  1168. */
  1169. theme: {
  1170. /** @internal */
  1171. zIndex: 6
  1172. },
  1173. /**
  1174. * The position of the button.
  1175. *
  1176. * @sample {highcharts} highcharts/chart/resetzoombutton-position/
  1177. * Above the plot area
  1178. * @sample {highstock} highcharts/chart/resetzoombutton-position/
  1179. * Above the plot area
  1180. * @sample {highmaps} highcharts/chart/resetzoombutton-position/
  1181. * Above the plot area
  1182. *
  1183. * @type {Highcharts.AlignObject}
  1184. * @since 2.2
  1185. */
  1186. position: {
  1187. /**
  1188. * The horizontal alignment of the button.
  1189. */
  1190. align: 'right',
  1191. /**
  1192. * The horizontal offset of the button.
  1193. */
  1194. x: -10,
  1195. /**
  1196. * The vertical alignment of the button.
  1197. *
  1198. * @type {Highcharts.VerticalAlignValue}
  1199. * @default top
  1200. * @apioption chart.resetZoomButton.position.verticalAlign
  1201. */
  1202. /**
  1203. * The vertical offset of the button.
  1204. */
  1205. y: 10
  1206. }
  1207. },
  1208. /**
  1209. * The pixel width of the plot area border.
  1210. *
  1211. * @sample {highcharts} highcharts/chart/plotborderwidth/
  1212. * 1px border
  1213. * @sample {highstock} stock/chart/plotborder/
  1214. * 2px border
  1215. * @sample {highmaps} maps/chart/plotborder/
  1216. * Plot border options
  1217. *
  1218. * @type {number}
  1219. * @default 0
  1220. * @apioption chart.plotBorderWidth
  1221. */
  1222. /**
  1223. * Whether to apply a drop shadow to the plot area. Requires that
  1224. * plotBackgroundColor be set. The shadow can be an object configuration
  1225. * containing `color`, `offsetX`, `offsetY`, `opacity` and `width`.
  1226. *
  1227. * @sample {highcharts} highcharts/chart/plotshadow/
  1228. * Plot shadow
  1229. * @sample {highstock} stock/chart/plotshadow/
  1230. * Plot shadow
  1231. * @sample {highmaps} maps/chart/plotborder/
  1232. * Plot border options
  1233. *
  1234. * @type {boolean|Highcharts.CSSObject}
  1235. * @default false
  1236. * @apioption chart.plotShadow
  1237. */
  1238. /**
  1239. * When true, cartesian charts like line, spline, area and column are
  1240. * transformed into the polar coordinate system. This produces _polar
  1241. * charts_, also known as _radar charts_.
  1242. *
  1243. * @sample {highcharts} highcharts/demo/polar/
  1244. * Polar chart
  1245. * @sample {highcharts} highcharts/demo/polar-wind-rose/
  1246. * Wind rose, stacked polar column chart
  1247. * @sample {highcharts} highcharts/demo/polar-spider/
  1248. * Spider web chart
  1249. * @sample {highcharts} highcharts/parallel-coordinates/polar/
  1250. * Star plot, multivariate data in a polar chart
  1251. *
  1252. * @type {boolean}
  1253. * @default false
  1254. * @since 2.3.0
  1255. * @product highcharts
  1256. * @requires highcharts-more
  1257. * @apioption chart.polar
  1258. */
  1259. /**
  1260. * Whether to reflow the chart to fit the width of the container div
  1261. * on resizing the window.
  1262. *
  1263. * @sample {highcharts} highcharts/chart/reflow-true/
  1264. * True by default
  1265. * @sample {highcharts} highcharts/chart/reflow-false/
  1266. * False
  1267. * @sample {highstock} stock/chart/reflow-true/
  1268. * True by default
  1269. * @sample {highstock} stock/chart/reflow-false/
  1270. * False
  1271. * @sample {highmaps} maps/chart/reflow-true/
  1272. * True by default
  1273. * @sample {highmaps} maps/chart/reflow-false/
  1274. * False
  1275. *
  1276. * @type {boolean}
  1277. * @default true
  1278. * @since 2.1
  1279. * @apioption chart.reflow
  1280. */
  1281. /**
  1282. * The HTML element where the chart will be rendered. If it is a string,
  1283. * the element by that id is used. The HTML element can also be passed
  1284. * by direct reference, or as the first argument of the chart
  1285. * constructor, in which case the option is not needed.
  1286. *
  1287. * @sample {highcharts} highcharts/chart/reflow-true/
  1288. * String
  1289. * @sample {highcharts} highcharts/chart/renderto-object/
  1290. * Object reference
  1291. * @sample {highcharts} highcharts/chart/renderto-jquery/
  1292. * Object reference through jQuery
  1293. * @sample {highstock} stock/chart/renderto-string/
  1294. * String
  1295. * @sample {highstock} stock/chart/renderto-object/
  1296. * Object reference
  1297. * @sample {highstock} stock/chart/renderto-jquery/
  1298. * Object reference through jQuery
  1299. *
  1300. * @type {string|Highcharts.HTMLDOMElement}
  1301. * @apioption chart.renderTo
  1302. */
  1303. /**
  1304. * The background color of the marker square when selecting (zooming
  1305. * in on) an area of the chart.
  1306. *
  1307. * @see In styled mode, the selection marker fill is set with the
  1308. * `.highcharts-selection-marker` class.
  1309. *
  1310. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  1311. * @default rgba(51,92,173,0.25)
  1312. * @since 2.1.7
  1313. * @apioption chart.selectionMarkerFill
  1314. */
  1315. /**
  1316. * Whether to apply a drop shadow to the outer chart area. Requires
  1317. * that backgroundColor be set. The shadow can be an object
  1318. * configuration containing `color`, `offsetX`, `offsetY`, `opacity` and
  1319. * `width`.
  1320. *
  1321. * @sample {highcharts} highcharts/chart/shadow/
  1322. * Shadow
  1323. * @sample {highstock} stock/chart/shadow/
  1324. * Shadow
  1325. * @sample {highmaps} maps/chart/border/
  1326. * Chart border and shadow
  1327. *
  1328. * @type {boolean|Highcharts.CSSObject}
  1329. * @default false
  1330. * @apioption chart.shadow
  1331. */
  1332. /**
  1333. * Whether to show the axes initially. This only applies to empty charts
  1334. * where series are added dynamically, as axes are automatically added
  1335. * to cartesian series.
  1336. *
  1337. * @sample {highcharts} highcharts/chart/showaxes-false/
  1338. * False by default
  1339. * @sample {highcharts} highcharts/chart/showaxes-true/
  1340. * True
  1341. *
  1342. * @type {boolean}
  1343. * @since 1.2.5
  1344. * @product highcharts gantt
  1345. * @apioption chart.showAxes
  1346. */
  1347. /**
  1348. * The space between the bottom edge of the chart and the content (plot
  1349. * area, axis title and labels, title, subtitle or legend in top
  1350. * position).
  1351. *
  1352. * @sample {highcharts} highcharts/chart/spacingbottom/
  1353. * Spacing bottom set to 100
  1354. * @sample {highstock} stock/chart/spacingbottom/
  1355. * Spacing bottom set to 100
  1356. * @sample {highmaps} maps/chart/spacing/
  1357. * Spacing 100 all around
  1358. *
  1359. * @type {number}
  1360. * @default 15
  1361. * @since 2.1
  1362. * @apioption chart.spacingBottom
  1363. */
  1364. /**
  1365. * The space between the left edge of the chart and the content (plot
  1366. * area, axis title and labels, title, subtitle or legend in top
  1367. * position).
  1368. *
  1369. * @sample {highcharts} highcharts/chart/spacingleft/
  1370. * Spacing left set to 100
  1371. * @sample {highstock} stock/chart/spacingleft/
  1372. * Spacing left set to 100
  1373. * @sample {highmaps} maps/chart/spacing/
  1374. * Spacing 100 all around
  1375. *
  1376. * @type {number}
  1377. * @default 10
  1378. * @since 2.1
  1379. * @apioption chart.spacingLeft
  1380. */
  1381. /**
  1382. * The space between the right edge of the chart and the content (plot
  1383. * area, axis title and labels, title, subtitle or legend in top
  1384. * position).
  1385. *
  1386. * @sample {highcharts} highcharts/chart/spacingright-100/
  1387. * Spacing set to 100
  1388. * @sample {highcharts} highcharts/chart/spacingright-legend/
  1389. * Legend in right position with default spacing
  1390. * @sample {highstock} stock/chart/spacingright/
  1391. * Spacing set to 100
  1392. * @sample {highmaps} maps/chart/spacing/
  1393. * Spacing 100 all around
  1394. *
  1395. * @type {number}
  1396. * @default 10
  1397. * @since 2.1
  1398. * @apioption chart.spacingRight
  1399. */
  1400. /**
  1401. * The space between the top edge of the chart and the content (plot
  1402. * area, axis title and labels, title, subtitle or legend in top
  1403. * position).
  1404. *
  1405. * @sample {highcharts} highcharts/chart/spacingtop-100/
  1406. * A top spacing of 100
  1407. * @sample {highcharts} highcharts/chart/spacingtop-10/
  1408. * Floating chart title makes the plot area align to the default
  1409. * spacingTop of 10.
  1410. * @sample {highstock} stock/chart/spacingtop/
  1411. * A top spacing of 100
  1412. * @sample {highmaps} maps/chart/spacing/
  1413. * Spacing 100 all around
  1414. *
  1415. * @type {number}
  1416. * @default 10
  1417. * @since 2.1
  1418. * @apioption chart.spacingTop
  1419. */
  1420. /**
  1421. * Additional CSS styles to apply inline to the container `div`. Note
  1422. * that since the default font styles are applied in the renderer, it
  1423. * is ignorant of the individual chart options and must be set globally.
  1424. *
  1425. * @see In styled mode, general chart styles can be set with the
  1426. * `.highcharts-root` class.
  1427. * @sample {highcharts} highcharts/chart/style-serif-font/
  1428. * Using a serif type font
  1429. * @sample {highcharts} highcharts/css/em/
  1430. * Styled mode with relative font sizes
  1431. * @sample {highstock} stock/chart/style/
  1432. * Using a serif type font
  1433. * @sample {highmaps} maps/chart/style-serif-font/
  1434. * Using a serif type font
  1435. *
  1436. * @type {Highcharts.CSSObject}
  1437. * @default {"fontFamily": "\"Lucida Grande\", \"Lucida Sans Unicode\", Verdana, Arial, Helvetica, sans-serif","fontSize":"12px"}
  1438. * @apioption chart.style
  1439. */
  1440. /**
  1441. * The default series type for the chart. Can be any of the chart types
  1442. * listed under [plotOptions](#plotOptions) and [series](#series) or can
  1443. * be a series provided by an additional module.
  1444. *
  1445. * In TypeScript this option has no effect in sense of typing and
  1446. * instead the `type` option must always be set in the series.
  1447. *
  1448. * @sample {highcharts} highcharts/chart/type-bar/
  1449. * Bar
  1450. * @sample {highstock} stock/chart/type/
  1451. * Areaspline
  1452. * @sample {highmaps} maps/chart/type-mapline/
  1453. * Mapline
  1454. *
  1455. * @type {string}
  1456. * @default {highcharts} line
  1457. * @default {highstock} line
  1458. * @default {highmaps} map
  1459. * @since 2.1.0
  1460. * @apioption chart.type
  1461. */
  1462. /**
  1463. * Decides in what dimensions the user can zoom by dragging the mouse.
  1464. * Can be one of `x`, `y` or `xy`.
  1465. *
  1466. * @see [panKey](#chart.panKey)
  1467. *
  1468. * @sample {highcharts} highcharts/chart/zoomtype-none/
  1469. * None by default
  1470. * @sample {highcharts} highcharts/chart/zoomtype-x/
  1471. * X
  1472. * @sample {highcharts} highcharts/chart/zoomtype-y/
  1473. * Y
  1474. * @sample {highcharts} highcharts/chart/zoomtype-xy/
  1475. * Xy
  1476. * @sample {highstock} stock/demo/basic-line/
  1477. * None by default
  1478. * @sample {highstock} stock/chart/zoomtype-x/
  1479. * X
  1480. * @sample {highstock} stock/chart/zoomtype-y/
  1481. * Y
  1482. * @sample {highstock} stock/chart/zoomtype-xy/
  1483. * Xy
  1484. *
  1485. * @type {string}
  1486. * @product highcharts highstock gantt
  1487. * @validvalue ["x", "y", "xy"]
  1488. * @apioption chart.zoomType
  1489. */
  1490. /**
  1491. * An explicit width for the chart. By default (when `null`) the width
  1492. * is calculated from the offset width of the containing element.
  1493. *
  1494. * @sample {highcharts} highcharts/chart/width/
  1495. * 800px wide
  1496. * @sample {highstock} stock/chart/width/
  1497. * 800px wide
  1498. * @sample {highmaps} maps/chart/size/
  1499. * Chart with explicit size
  1500. *
  1501. * @type {null|number|string}
  1502. */
  1503. width: null,
  1504. /**
  1505. * An explicit height for the chart. If a _number_, the height is
  1506. * given in pixels. If given a _percentage string_ (for example
  1507. * `'56%'`), the height is given as the percentage of the actual chart
  1508. * width. This allows for preserving the aspect ratio across responsive
  1509. * sizes.
  1510. *
  1511. * By default (when `null`) the height is calculated from the offset
  1512. * height of the containing element, or 400 pixels if the containing
  1513. * element's height is 0.
  1514. *
  1515. * @sample {highcharts} highcharts/chart/height/
  1516. * 500px height
  1517. * @sample {highstock} stock/chart/height/
  1518. * 300px height
  1519. * @sample {highmaps} maps/chart/size/
  1520. * Chart with explicit size
  1521. * @sample highcharts/chart/height-percent/
  1522. * Highcharts with percentage height
  1523. *
  1524. * @type {null|number|string}
  1525. */
  1526. height: null,
  1527. /**
  1528. * The color of the outer chart border.
  1529. *
  1530. * @see In styled mode, the stroke is set with the
  1531. * `.highcharts-background` class.
  1532. *
  1533. * @sample {highcharts} highcharts/chart/bordercolor/
  1534. * Brown border
  1535. * @sample {highstock} stock/chart/border/
  1536. * Brown border
  1537. * @sample {highmaps} maps/chart/border/
  1538. * Border options
  1539. *
  1540. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  1541. */
  1542. borderColor: '#335cad',
  1543. /**
  1544. * The pixel width of the outer chart border.
  1545. *
  1546. * @see In styled mode, the stroke is set with the
  1547. * `.highcharts-background` class.
  1548. *
  1549. * @sample {highcharts} highcharts/chart/borderwidth/
  1550. * 5px border
  1551. * @sample {highstock} stock/chart/border/
  1552. * 2px border
  1553. * @sample {highmaps} maps/chart/border/
  1554. * Border options
  1555. *
  1556. * @type {number}
  1557. * @default 0
  1558. * @apioption chart.borderWidth
  1559. */
  1560. /**
  1561. * The background color or gradient for the outer chart area.
  1562. *
  1563. * @see In styled mode, the background is set with the
  1564. * `.highcharts-background` class.
  1565. *
  1566. * @sample {highcharts} highcharts/chart/backgroundcolor-color/
  1567. * Color
  1568. * @sample {highcharts} highcharts/chart/backgroundcolor-gradient/
  1569. * Gradient
  1570. * @sample {highstock} stock/chart/backgroundcolor-color/
  1571. * Color
  1572. * @sample {highstock} stock/chart/backgroundcolor-gradient/
  1573. * Gradient
  1574. * @sample {highmaps} maps/chart/backgroundcolor-color/
  1575. * Color
  1576. * @sample {highmaps} maps/chart/backgroundcolor-gradient/
  1577. * Gradient
  1578. *
  1579. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  1580. */
  1581. backgroundColor: '#ffffff',
  1582. /**
  1583. * The background color or gradient for the plot area.
  1584. *
  1585. * @see In styled mode, the plot background is set with the
  1586. * `.highcharts-plot-background` class.
  1587. *
  1588. * @sample {highcharts} highcharts/chart/plotbackgroundcolor-color/
  1589. * Color
  1590. * @sample {highcharts} highcharts/chart/plotbackgroundcolor-gradient/
  1591. * Gradient
  1592. * @sample {highstock} stock/chart/plotbackgroundcolor-color/
  1593. * Color
  1594. * @sample {highstock} stock/chart/plotbackgroundcolor-gradient/
  1595. * Gradient
  1596. * @sample {highmaps} maps/chart/plotbackgroundcolor-color/
  1597. * Color
  1598. * @sample {highmaps} maps/chart/plotbackgroundcolor-gradient/
  1599. * Gradient
  1600. *
  1601. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  1602. * @apioption chart.plotBackgroundColor
  1603. */
  1604. /**
  1605. * The URL for an image to use as the plot background. To set an image
  1606. * as the background for the entire chart, set a CSS background image
  1607. * to the container element. Note that for the image to be applied to
  1608. * exported charts, its URL needs to be accessible by the export server.
  1609. *
  1610. * @see In styled mode, a plot background image can be set with the
  1611. * `.highcharts-plot-background` class and a [custom pattern](
  1612. * https://www.highcharts.com/docs/chart-design-and-style/
  1613. * gradients-shadows-and-patterns).
  1614. *
  1615. * @sample {highcharts} highcharts/chart/plotbackgroundimage/
  1616. * Skies
  1617. * @sample {highstock} stock/chart/plotbackgroundimage/
  1618. * Skies
  1619. *
  1620. * @type {string}
  1621. * @apioption chart.plotBackgroundImage
  1622. */
  1623. /**
  1624. * The color of the inner chart or plot area border.
  1625. *
  1626. * @see In styled mode, a plot border stroke can be set with the
  1627. * `.highcharts-plot-border` class.
  1628. *
  1629. * @sample {highcharts} highcharts/chart/plotbordercolor/
  1630. * Blue border
  1631. * @sample {highstock} stock/chart/plotborder/
  1632. * Blue border
  1633. * @sample {highmaps} maps/chart/plotborder/
  1634. * Plot border options
  1635. *
  1636. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  1637. */
  1638. plotBorderColor: '#cccccc'
  1639. },
  1640. /**
  1641. * The chart's main title.
  1642. *
  1643. * @sample {highmaps} maps/title/title/
  1644. * Title options demonstrated
  1645. */
  1646. title: {
  1647. /**
  1648. * When the title is floating, the plot area will not move to make space
  1649. * for it.
  1650. *
  1651. * @sample {highcharts} highcharts/chart/zoomtype-none/
  1652. * False by default
  1653. * @sample {highcharts} highcharts/title/floating/
  1654. * True - title on top of the plot area
  1655. * @sample {highstock} stock/chart/title-floating/
  1656. * True - title on top of the plot area
  1657. *
  1658. * @type {boolean}
  1659. * @default false
  1660. * @since 2.1
  1661. * @apioption title.floating
  1662. */
  1663. /**
  1664. * CSS styles for the title. Use this for font styling, but use `align`,
  1665. * `x` and `y` for text alignment.
  1666. *
  1667. * In styled mode, the title style is given in the `.highcharts-title`
  1668. * class.
  1669. *
  1670. * @sample {highcharts} highcharts/title/style/
  1671. * Custom color and weight
  1672. * @sample {highstock} stock/chart/title-style/
  1673. * Custom color and weight
  1674. * @sample highcharts/css/titles/
  1675. * Styled mode
  1676. *
  1677. * @type {Highcharts.CSSObject}
  1678. * @default {highcharts|highmaps} { "color": "#333333", "fontSize": "18px" }
  1679. * @default {highstock} { "color": "#333333", "fontSize": "16px" }
  1680. * @apioption title.style
  1681. */
  1682. /**
  1683. * Whether to
  1684. * [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)
  1685. * to render the text.
  1686. *
  1687. * @type {boolean}
  1688. * @default false
  1689. * @apioption title.useHTML
  1690. */
  1691. /**
  1692. * The vertical alignment of the title. Can be one of `"top"`,
  1693. * `"middle"` and `"bottom"`. When a value is given, the title behaves
  1694. * as if [floating](#title.floating) were `true`.
  1695. *
  1696. * @sample {highcharts} highcharts/title/verticalalign/
  1697. * Chart title in bottom right corner
  1698. * @sample {highstock} stock/chart/title-verticalalign/
  1699. * Chart title in bottom right corner
  1700. *
  1701. * @type {Highcharts.VerticalAlignValue}
  1702. * @since 2.1
  1703. * @apioption title.verticalAlign
  1704. */
  1705. /**
  1706. * The x position of the title relative to the alignment within
  1707. * `chart.spacingLeft` and `chart.spacingRight`.
  1708. *
  1709. * @sample {highcharts} highcharts/title/align/
  1710. * Aligned to the plot area (x = 70px = margin left - spacing
  1711. * left)
  1712. * @sample {highstock} stock/chart/title-align/
  1713. * Aligned to the plot area (x = 50px = margin left - spacing
  1714. * left)
  1715. *
  1716. * @type {number}
  1717. * @default 0
  1718. * @since 2.0
  1719. * @apioption title.x
  1720. */
  1721. /**
  1722. * The y position of the title relative to the alignment within
  1723. * [chart.spacingTop](#chart.spacingTop) and [chart.spacingBottom](
  1724. * #chart.spacingBottom). By default it depends on the font size.
  1725. *
  1726. * @sample {highcharts} highcharts/title/y/
  1727. * Title inside the plot area
  1728. * @sample {highstock} stock/chart/title-verticalalign/
  1729. * Chart title in bottom right corner
  1730. *
  1731. * @type {number}
  1732. * @since 2.0
  1733. * @apioption title.y
  1734. */
  1735. /**
  1736. * The title of the chart. To disable the title, set the `text` to
  1737. * `undefined`.
  1738. *
  1739. * @sample {highcharts} highcharts/title/text/
  1740. * Custom title
  1741. * @sample {highstock} stock/chart/title-text/
  1742. * Custom title
  1743. *
  1744. * @default {highcharts|highmaps} Chart title
  1745. * @default {highstock} undefined
  1746. */
  1747. text: 'Chart title',
  1748. /**
  1749. * The horizontal alignment of the title. Can be one of "left", "center"
  1750. * and "right".
  1751. *
  1752. * @sample {highcharts} highcharts/title/align/
  1753. * Aligned to the plot area (x = 70px = margin left - spacing
  1754. * left)
  1755. * @sample {highstock} stock/chart/title-align/
  1756. * Aligned to the plot area (x = 50px = margin left - spacing
  1757. * left)
  1758. *
  1759. * @type {Highcharts.AlignValue}
  1760. * @since 2.0
  1761. */
  1762. align: 'center',
  1763. /**
  1764. * The margin between the title and the plot area, or if a subtitle
  1765. * is present, the margin between the subtitle and the plot area.
  1766. *
  1767. * @sample {highcharts} highcharts/title/margin-50/
  1768. * A chart title margin of 50
  1769. * @sample {highcharts} highcharts/title/margin-subtitle/
  1770. * The same margin applied with a subtitle
  1771. * @sample {highstock} stock/chart/title-margin/
  1772. * A chart title margin of 50
  1773. *
  1774. * @since 2.1
  1775. */
  1776. margin: 15,
  1777. /**
  1778. * Adjustment made to the title width, normally to reserve space for
  1779. * the exporting burger menu.
  1780. *
  1781. * @sample highcharts/title/widthadjust/
  1782. * Wider menu, greater padding
  1783. *
  1784. * @since 4.2.5
  1785. */
  1786. widthAdjust: -44
  1787. },
  1788. /**
  1789. * The chart's subtitle. This can be used both to display a subtitle below
  1790. * the main title, and to display random text anywhere in the chart. The
  1791. * subtitle can be updated after chart initialization through the
  1792. * `Chart.setTitle` method.
  1793. *
  1794. * @sample {highmaps} maps/title/subtitle/
  1795. * Subtitle options demonstrated
  1796. */
  1797. subtitle: {
  1798. /**
  1799. * When the subtitle is floating, the plot area will not move to make
  1800. * space for it.
  1801. *
  1802. * @sample {highcharts} highcharts/subtitle/floating/
  1803. * Floating title and subtitle
  1804. * @sample {highstock} stock/chart/subtitle-footnote
  1805. * Footnote floating at bottom right of plot area
  1806. *
  1807. * @type {boolean}
  1808. * @default false
  1809. * @since 2.1
  1810. * @apioption subtitle.floating
  1811. */
  1812. /**
  1813. * CSS styles for the title.
  1814. *
  1815. * In styled mode, the subtitle style is given in the
  1816. * `.highcharts-subtitle` class.
  1817. *
  1818. * @sample {highcharts} highcharts/subtitle/style/
  1819. * Custom color and weight
  1820. * @sample {highcharts} highcharts/css/titles/
  1821. * Styled mode
  1822. * @sample {highstock} stock/chart/subtitle-style
  1823. * Custom color and weight
  1824. * @sample {highstock} highcharts/css/titles/
  1825. * Styled mode
  1826. * @sample {highmaps} highcharts/css/titles/
  1827. * Styled mode
  1828. *
  1829. * @type {Highcharts.CSSObject}
  1830. * @default {"color": "#666666"}
  1831. * @apioption subtitle.style
  1832. */
  1833. /**
  1834. * Whether to
  1835. * [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)
  1836. * to render the text.
  1837. *
  1838. * @type {boolean}
  1839. * @default false
  1840. * @apioption subtitle.useHTML
  1841. */
  1842. /**
  1843. * The vertical alignment of the title. Can be one of `"top"`,
  1844. * `"middle"` and `"bottom"`. When middle, the subtitle behaves as
  1845. * floating.
  1846. *
  1847. * @sample {highcharts} highcharts/subtitle/verticalalign/
  1848. * Footnote at the bottom right of plot area
  1849. * @sample {highstock} stock/chart/subtitle-footnote
  1850. * Footnote at the bottom right of plot area
  1851. *
  1852. * @type {Highcharts.VerticalAlignValue}
  1853. * @since 2.1
  1854. * @apioption subtitle.verticalAlign
  1855. */
  1856. /**
  1857. * The x position of the subtitle relative to the alignment within
  1858. * `chart.spacingLeft` and `chart.spacingRight`.
  1859. *
  1860. * @sample {highcharts} highcharts/subtitle/align/
  1861. * Footnote at right of plot area
  1862. * @sample {highstock} stock/chart/subtitle-footnote
  1863. * Footnote at the bottom right of plot area
  1864. *
  1865. * @type {number}
  1866. * @default 0
  1867. * @since 2.0
  1868. * @apioption subtitle.x
  1869. */
  1870. /**
  1871. * The y position of the subtitle relative to the alignment within
  1872. * `chart.spacingTop` and `chart.spacingBottom`. By default the subtitle
  1873. * is laid out below the title unless the title is floating.
  1874. *
  1875. * @sample {highcharts} highcharts/subtitle/verticalalign/
  1876. * Footnote at the bottom right of plot area
  1877. * @sample {highstock} stock/chart/subtitle-footnote
  1878. * Footnote at the bottom right of plot area
  1879. *
  1880. * @type {number}
  1881. * @since 2.0
  1882. * @apioption subtitle.y
  1883. */
  1884. /**
  1885. * The subtitle of the chart.
  1886. *
  1887. * @sample {highcharts|highstock} highcharts/subtitle/text/
  1888. * Custom subtitle
  1889. * @sample {highcharts|highstock} highcharts/subtitle/text-formatted/
  1890. * Formatted and linked text.
  1891. */
  1892. text: '',
  1893. /**
  1894. * The horizontal alignment of the subtitle. Can be one of "left",
  1895. * "center" and "right".
  1896. *
  1897. * @sample {highcharts} highcharts/subtitle/align/
  1898. * Footnote at right of plot area
  1899. * @sample {highstock} stock/chart/subtitle-footnote
  1900. * Footnote at bottom right of plot area
  1901. *
  1902. * @type {Highcharts.AlignValue}
  1903. * @since 2.0
  1904. */
  1905. align: 'center',
  1906. /**
  1907. * Adjustment made to the subtitle width, normally to reserve space
  1908. * for the exporting burger menu.
  1909. *
  1910. * @see [title.widthAdjust](#title.widthAdjust)
  1911. *
  1912. * @sample highcharts/title/widthadjust/
  1913. * Wider menu, greater padding
  1914. *
  1915. * @since 4.2.5
  1916. */
  1917. widthAdjust: -44
  1918. },
  1919. /**
  1920. * The chart's caption, which will render below the chart and will be part
  1921. * of exported charts. The caption can be updated after chart initialization
  1922. * through the `Chart.update` or `Chart.caption.update` methods.
  1923. *
  1924. * @sample highcharts/caption/text/
  1925. * A chart with a caption
  1926. * @since 7.2.0
  1927. */
  1928. caption: {
  1929. /**
  1930. * When the caption is floating, the plot area will not move to make
  1931. * space for it.
  1932. *
  1933. * @type {boolean}
  1934. * @default false
  1935. * @apioption caption.floating
  1936. */
  1937. /**
  1938. * The margin between the caption and the plot area.
  1939. */
  1940. margin: 15,
  1941. /**
  1942. * CSS styles for the caption.
  1943. *
  1944. * In styled mode, the caption style is given in the
  1945. * `.highcharts-caption` class.
  1946. *
  1947. * @sample {highcharts} highcharts/css/titles/
  1948. * Styled mode
  1949. *
  1950. * @type {Highcharts.CSSObject}
  1951. * @default {"color": "#666666"}
  1952. * @apioption caption.style
  1953. */
  1954. /**
  1955. * Whether to
  1956. * [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)
  1957. * to render the text.
  1958. *
  1959. * @type {boolean}
  1960. * @default false
  1961. * @apioption caption.useHTML
  1962. */
  1963. /**
  1964. * The x position of the caption relative to the alignment within
  1965. * `chart.spacingLeft` and `chart.spacingRight`.
  1966. *
  1967. * @type {number}
  1968. * @default 0
  1969. * @apioption caption.x
  1970. */
  1971. /**
  1972. * The y position of the caption relative to the alignment within
  1973. * `chart.spacingTop` and `chart.spacingBottom`.
  1974. *
  1975. * @type {number}
  1976. * @apioption caption.y
  1977. */
  1978. /**
  1979. * The caption text of the chart.
  1980. *
  1981. * @sample {highcharts} highcharts/caption/text/
  1982. * Custom caption
  1983. */
  1984. text: '',
  1985. /**
  1986. * The horizontal alignment of the caption. Can be one of "left",
  1987. * "center" and "right".
  1988. *
  1989. * @type {Highcharts.AlignValue}
  1990. */
  1991. align: 'left',
  1992. /**
  1993. * The vertical alignment of the caption. Can be one of `"top"`,
  1994. * `"middle"` and `"bottom"`. When middle, the caption behaves as
  1995. * floating.
  1996. *
  1997. * @type {Highcharts.VerticalAlignValue}
  1998. */
  1999. verticalAlign: 'bottom'
  2000. },
  2001. /**
  2002. * The plotOptions is a wrapper object for config objects for each series
  2003. * type. The config objects for each series can also be overridden for
  2004. * each series item as given in the series array.
  2005. *
  2006. * Configuration options for the series are given in three levels. Options
  2007. * for all series in a chart are given in the [plotOptions.series](
  2008. * #plotOptions.series) object. Then options for all series of a specific
  2009. * type are given in the plotOptions of that type, for example
  2010. * `plotOptions.line`. Next, options for one single series are given in
  2011. * [the series array](#series).
  2012. */
  2013. plotOptions: {},
  2014. /**
  2015. * HTML labels that can be positioned anywhere in the chart area.
  2016. *
  2017. * This option is deprecated since v7.1.2. Instead, use
  2018. * [annotations](#annotations) that support labels.
  2019. *
  2020. * @deprecated
  2021. * @product highcharts highstock
  2022. */
  2023. labels: {
  2024. /**
  2025. * An HTML label that can be positioned anywhere in the chart area.
  2026. *
  2027. * @deprecated
  2028. * @type {Array<*>}
  2029. * @apioption labels.items
  2030. */
  2031. /**
  2032. * Inner HTML or text for the label.
  2033. *
  2034. * @deprecated
  2035. * @type {string}
  2036. * @apioption labels.items.html
  2037. */
  2038. /**
  2039. * CSS styles for each label. To position the label, use left and top
  2040. * like this:
  2041. * ```js
  2042. * style: {
  2043. * left: '100px',
  2044. * top: '100px'
  2045. * }
  2046. * ```
  2047. *
  2048. * @deprecated
  2049. * @type {Highcharts.CSSObject}
  2050. * @apioption labels.items.style
  2051. */
  2052. /**
  2053. * Shared CSS styles for all labels.
  2054. *
  2055. * @deprecated
  2056. * @type {Highcharts.CSSObject}
  2057. * @default {"color": "#333333", "position": "absolute"}
  2058. */
  2059. style: {
  2060. /**
  2061. * @ignore-option
  2062. */
  2063. position: 'absolute',
  2064. /**
  2065. * @ignore-option
  2066. */
  2067. color: '#333333'
  2068. }
  2069. },
  2070. /**
  2071. * The legend is a box containing a symbol and name for each series
  2072. * item or point item in the chart. Each series (or points in case
  2073. * of pie charts) is represented by a symbol and its name in the legend.
  2074. *
  2075. * It is possible to override the symbol creator function and create
  2076. * [custom legend symbols](https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/studies/legend-custom-symbol/).
  2077. *
  2078. * @productdesc {highmaps}
  2079. * A Highmaps legend by default contains one legend item per series, but if
  2080. * a `colorAxis` is defined, the axis will be displayed in the legend.
  2081. * Either as a gradient, or as multiple legend items for `dataClasses`.
  2082. */
  2083. legend: {
  2084. /**
  2085. * The background color of the legend.
  2086. *
  2087. * @see In styled mode, the legend background fill can be applied with
  2088. * the `.highcharts-legend-box` class.
  2089. *
  2090. * @sample {highcharts} highcharts/legend/backgroundcolor/
  2091. * Yellowish background
  2092. * @sample {highstock} stock/legend/align/
  2093. * Various legend options
  2094. * @sample {highmaps} maps/legend/border-background/
  2095. * Border and background options
  2096. *
  2097. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  2098. * @apioption legend.backgroundColor
  2099. */
  2100. /**
  2101. * The width of the drawn border around the legend.
  2102. *
  2103. * @see In styled mode, the legend border stroke width can be applied
  2104. * with the `.highcharts-legend-box` class.
  2105. *
  2106. * @sample {highcharts} highcharts/legend/borderwidth/
  2107. * 2px border width
  2108. * @sample {highstock} stock/legend/align/
  2109. * Various legend options
  2110. * @sample {highmaps} maps/legend/border-background/
  2111. * Border and background options
  2112. *
  2113. * @type {number}
  2114. * @default 0
  2115. * @apioption legend.borderWidth
  2116. */
  2117. /**
  2118. * Enable or disable the legend. There is also a series-specific option,
  2119. * [showInLegend](#plotOptions.series.showInLegend), that can hide the
  2120. * series from the legend. In some series types this is `false` by
  2121. * default, so it must set to `true` in order to show the legend for the
  2122. * series.
  2123. *
  2124. * @sample {highcharts} highcharts/legend/enabled-false/ Legend disabled
  2125. * @sample {highstock} stock/legend/align/ Various legend options
  2126. * @sample {highmaps} maps/legend/enabled-false/ Legend disabled
  2127. *
  2128. * @default {highstock} false
  2129. * @default {highmaps} true
  2130. * @default {gantt} false
  2131. */
  2132. enabled: true,
  2133. /**
  2134. * The horizontal alignment of the legend box within the chart area.
  2135. * Valid values are `left`, `center` and `right`.
  2136. *
  2137. * In the case that the legend is aligned in a corner position, the
  2138. * `layout` option will determine whether to place it above/below
  2139. * or on the side of the plot area.
  2140. *
  2141. * @sample {highcharts} highcharts/legend/align/
  2142. * Legend at the right of the chart
  2143. * @sample {highstock} stock/legend/align/
  2144. * Various legend options
  2145. * @sample {highmaps} maps/legend/alignment/
  2146. * Legend alignment
  2147. *
  2148. * @type {Highcharts.AlignValue}
  2149. * @since 2.0
  2150. */
  2151. align: 'center',
  2152. /**
  2153. * If the [layout](legend.layout) is `horizontal` and the legend items
  2154. * span over two lines or more, whether to align the items into vertical
  2155. * columns. Setting this to `false` makes room for more items, but will
  2156. * look more messy.
  2157. *
  2158. * @since 6.1.0
  2159. */
  2160. alignColumns: true,
  2161. /**
  2162. * When the legend is floating, the plot area ignores it and is allowed
  2163. * to be placed below it.
  2164. *
  2165. * @sample {highcharts} highcharts/legend/floating-false/
  2166. * False by default
  2167. * @sample {highcharts} highcharts/legend/floating-true/
  2168. * True
  2169. * @sample {highmaps} maps/legend/alignment/
  2170. * Floating legend
  2171. *
  2172. * @type {boolean}
  2173. * @default false
  2174. * @since 2.1
  2175. * @apioption legend.floating
  2176. */
  2177. /**
  2178. * The layout of the legend items. Can be one of `horizontal` or
  2179. * `vertical` or `proximate`. When `proximate`, the legend items will be
  2180. * placed as close as possible to the graphs they're representing,
  2181. * except in inverted charts or when the legend position doesn't allow
  2182. * it.
  2183. *
  2184. * @sample {highcharts} highcharts/legend/layout-horizontal/
  2185. * Horizontal by default
  2186. * @sample {highcharts} highcharts/legend/layout-vertical/
  2187. * Vertical
  2188. * @sample highcharts/legend/layout-proximate
  2189. * Labels proximate to the data
  2190. * @sample {highstock} stock/legend/layout-horizontal/
  2191. * Horizontal by default
  2192. * @sample {highmaps} maps/legend/padding-itemmargin/
  2193. * Vertical with data classes
  2194. * @sample {highmaps} maps/legend/layout-vertical/
  2195. * Vertical with color axis gradient
  2196. *
  2197. * @validvalue ["horizontal", "vertical", "proximate"]
  2198. */
  2199. layout: 'horizontal',
  2200. /**
  2201. * In a legend with horizontal layout, the itemDistance defines the
  2202. * pixel distance between each item.
  2203. *
  2204. * @sample {highcharts} highcharts/legend/layout-horizontal/
  2205. * 50px item distance
  2206. * @sample {highstock} highcharts/legend/layout-horizontal/
  2207. * 50px item distance
  2208. *
  2209. * @type {number}
  2210. * @default {highcharts} 20
  2211. * @default {highstock} 20
  2212. * @default {highmaps} 8
  2213. * @since 3.0.3
  2214. * @apioption legend.itemDistance
  2215. */
  2216. /**
  2217. * The pixel bottom margin for each legend item.
  2218. *
  2219. * @sample {highcharts|highstock} highcharts/legend/padding-itemmargin/
  2220. * Padding and item margins demonstrated
  2221. * @sample {highmaps} maps/legend/padding-itemmargin/
  2222. * Padding and item margins demonstrated
  2223. *
  2224. * @type {number}
  2225. * @default 0
  2226. * @since 2.2.0
  2227. * @apioption legend.itemMarginBottom
  2228. */
  2229. /**
  2230. * The pixel top margin for each legend item.
  2231. *
  2232. * @sample {highcharts|highstock} highcharts/legend/padding-itemmargin/
  2233. * Padding and item margins demonstrated
  2234. * @sample {highmaps} maps/legend/padding-itemmargin/
  2235. * Padding and item margins demonstrated
  2236. *
  2237. * @type {number}
  2238. * @default 0
  2239. * @since 2.2.0
  2240. * @apioption legend.itemMarginTop
  2241. */
  2242. /**
  2243. * The width for each legend item. By default the items are laid out
  2244. * successively. In a [horizontal layout](legend.layout), if the items
  2245. * are laid out across two rows or more, they will be vertically aligned
  2246. * depending on the [legend.alignColumns](legend.alignColumns) option.
  2247. *
  2248. * @sample {highcharts} highcharts/legend/itemwidth-default/
  2249. * Undefined by default
  2250. * @sample {highcharts} highcharts/legend/itemwidth-80/
  2251. * 80 for aligned legend items
  2252. *
  2253. * @type {number}
  2254. * @since 2.0
  2255. * @apioption legend.itemWidth
  2256. */
  2257. /**
  2258. * A [format string](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting)
  2259. * for each legend label. Available variables relates to properties on
  2260. * the series, or the point in case of pies.
  2261. *
  2262. * @type {string}
  2263. * @default {name}
  2264. * @since 1.3
  2265. * @apioption legend.labelFormat
  2266. */
  2267. /* eslint-disable valid-jsdoc */
  2268. /**
  2269. * Callback function to format each of the series' labels. The `this`
  2270. * keyword refers to the series object, or the point object in case of
  2271. * pie charts. By default the series or point name is printed.
  2272. *
  2273. * @productdesc {highmaps}
  2274. * In Highmaps the context can also be a data class in case of a
  2275. * `colorAxis`.
  2276. *
  2277. * @sample {highcharts} highcharts/legend/labelformatter/
  2278. * Add text
  2279. * @sample {highmaps} maps/legend/labelformatter/
  2280. * Data classes with label formatter
  2281. *
  2282. * @type {Highcharts.FormatterCallbackFunction<Point|Series>}
  2283. */
  2284. labelFormatter: function () {
  2285. /** eslint-enable valid-jsdoc */
  2286. return this.name;
  2287. },
  2288. /**
  2289. * Line height for the legend items. Deprecated as of 2.1\. Instead,
  2290. * the line height for each item can be set using
  2291. * `itemStyle.lineHeight`, and the padding between items using
  2292. * `itemMarginTop` and `itemMarginBottom`.
  2293. *
  2294. * @sample {highcharts} highcharts/legend/lineheight/
  2295. * Setting padding
  2296. *
  2297. * @deprecated
  2298. *
  2299. * @type {number}
  2300. * @default 16
  2301. * @since 2.0
  2302. * @product highcharts gantt
  2303. * @apioption legend.lineHeight
  2304. */
  2305. /**
  2306. * If the plot area sized is calculated automatically and the legend is
  2307. * not floating, the legend margin is the space between the legend and
  2308. * the axis labels or plot area.
  2309. *
  2310. * @sample {highcharts} highcharts/legend/margin-default/
  2311. * 12 pixels by default
  2312. * @sample {highcharts} highcharts/legend/margin-30/
  2313. * 30 pixels
  2314. *
  2315. * @type {number}
  2316. * @default 12
  2317. * @since 2.1
  2318. * @apioption legend.margin
  2319. */
  2320. /**
  2321. * Maximum pixel height for the legend. When the maximum height is
  2322. * extended, navigation will show.
  2323. *
  2324. * @type {number}
  2325. * @since 2.3.0
  2326. * @apioption legend.maxHeight
  2327. */
  2328. /**
  2329. * The color of the drawn border around the legend.
  2330. *
  2331. * @see In styled mode, the legend border stroke can be applied with the
  2332. * `.highcharts-legend-box` class.
  2333. *
  2334. * @sample {highcharts} highcharts/legend/bordercolor/
  2335. * Brown border
  2336. * @sample {highstock} stock/legend/align/
  2337. * Various legend options
  2338. * @sample {highmaps} maps/legend/border-background/
  2339. * Border and background options
  2340. *
  2341. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  2342. */
  2343. borderColor: '#999999',
  2344. /**
  2345. * The border corner radius of the legend.
  2346. *
  2347. * @sample {highcharts} highcharts/legend/borderradius-default/
  2348. * Square by default
  2349. * @sample {highcharts} highcharts/legend/borderradius-round/
  2350. * 5px rounded
  2351. * @sample {highmaps} maps/legend/border-background/
  2352. * Border and background options
  2353. */
  2354. borderRadius: 0,
  2355. /**
  2356. * Options for the paging or navigation appearing when the legend is
  2357. * overflown. Navigation works well on screen, but not in static
  2358. * exported images. One way of working around that is to
  2359. * [increase the chart height in
  2360. * export](https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/legend/navigation-enabled-false/).
  2361. */
  2362. navigation: {
  2363. /**
  2364. * How to animate the pages when navigating up or down. A value of
  2365. * `true` applies the default navigation given in the
  2366. * `chart.animation` option. Additional options can be given as an
  2367. * object containing values for easing and duration.
  2368. *
  2369. * @sample {highcharts} highcharts/legend/navigation/
  2370. * Legend page navigation demonstrated
  2371. * @sample {highstock} highcharts/legend/navigation/
  2372. * Legend page navigation demonstrated
  2373. *
  2374. * @type {boolean|Partial<Highcharts.AnimationOptionsObject>}
  2375. * @default true
  2376. * @since 2.2.4
  2377. * @apioption legend.navigation.animation
  2378. */
  2379. /**
  2380. * The pixel size of the up and down arrows in the legend paging
  2381. * navigation.
  2382. *
  2383. * @sample {highcharts} highcharts/legend/navigation/
  2384. * Legend page navigation demonstrated
  2385. * @sample {highstock} highcharts/legend/navigation/
  2386. * Legend page navigation demonstrated
  2387. *
  2388. * @type {number}
  2389. * @default 12
  2390. * @since 2.2.4
  2391. * @apioption legend.navigation.arrowSize
  2392. */
  2393. /**
  2394. * Whether to enable the legend navigation. In most cases, disabling
  2395. * the navigation results in an unwanted overflow.
  2396. *
  2397. * See also the [adapt chart to legend](
  2398. * https://www.highcharts.com/products/plugin-registry/single/8/Adapt-Chart-To-Legend)
  2399. * plugin for a solution to extend the chart height to make room for
  2400. * the legend, optionally in exported charts only.
  2401. *
  2402. * @type {boolean}
  2403. * @default true
  2404. * @since 4.2.4
  2405. * @apioption legend.navigation.enabled
  2406. */
  2407. /**
  2408. * Text styles for the legend page navigation.
  2409. *
  2410. * @see In styled mode, the navigation items are styled with the
  2411. * `.highcharts-legend-navigation` class.
  2412. *
  2413. * @sample {highcharts} highcharts/legend/navigation/
  2414. * Legend page navigation demonstrated
  2415. * @sample {highstock} highcharts/legend/navigation/
  2416. * Legend page navigation demonstrated
  2417. *
  2418. * @type {Highcharts.CSSObject}
  2419. * @since 2.2.4
  2420. * @apioption legend.navigation.style
  2421. */
  2422. /**
  2423. * The color for the active up or down arrow in the legend page
  2424. * navigation.
  2425. *
  2426. * @see In styled mode, the active arrow be styled with the
  2427. * `.highcharts-legend-nav-active` class.
  2428. *
  2429. * @sample {highcharts} highcharts/legend/navigation/
  2430. * Legend page navigation demonstrated
  2431. * @sample {highstock} highcharts/legend/navigation/
  2432. * Legend page navigation demonstrated
  2433. *
  2434. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  2435. * @since 2.2.4
  2436. */
  2437. activeColor: '#003399',
  2438. /**
  2439. * The color of the inactive up or down arrow in the legend page
  2440. * navigation. .
  2441. *
  2442. * @see In styled mode, the inactive arrow be styled with the
  2443. * `.highcharts-legend-nav-inactive` class.
  2444. *
  2445. * @sample {highcharts} highcharts/legend/navigation/
  2446. * Legend page navigation demonstrated
  2447. * @sample {highstock} highcharts/legend/navigation/
  2448. * Legend page navigation demonstrated
  2449. *
  2450. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  2451. * @since 2.2.4
  2452. */
  2453. inactiveColor: '#cccccc'
  2454. },
  2455. /**
  2456. * The inner padding of the legend box.
  2457. *
  2458. * @sample {highcharts|highstock} highcharts/legend/padding-itemmargin/
  2459. * Padding and item margins demonstrated
  2460. * @sample {highmaps} maps/legend/padding-itemmargin/
  2461. * Padding and item margins demonstrated
  2462. *
  2463. * @type {number}
  2464. * @default 8
  2465. * @since 2.2.0
  2466. * @apioption legend.padding
  2467. */
  2468. /**
  2469. * Whether to reverse the order of the legend items compared to the
  2470. * order of the series or points as defined in the configuration object.
  2471. *
  2472. * @see [yAxis.reversedStacks](#yAxis.reversedStacks),
  2473. * [series.legendIndex](#series.legendIndex)
  2474. *
  2475. * @sample {highcharts} highcharts/legend/reversed/
  2476. * Stacked bar with reversed legend
  2477. *
  2478. * @type {boolean}
  2479. * @default false
  2480. * @since 1.2.5
  2481. * @apioption legend.reversed
  2482. */
  2483. /**
  2484. * Whether to show the symbol on the right side of the text rather than
  2485. * the left side. This is common in Arabic and Hebraic.
  2486. *
  2487. * @sample {highcharts} highcharts/legend/rtl/
  2488. * Symbol to the right
  2489. *
  2490. * @type {boolean}
  2491. * @default false
  2492. * @since 2.2
  2493. * @apioption legend.rtl
  2494. */
  2495. /**
  2496. * CSS styles for the legend area. In the 1.x versions the position
  2497. * of the legend area was determined by CSS. In 2.x, the position is
  2498. * determined by properties like `align`, `verticalAlign`, `x` and `y`,
  2499. * but the styles are still parsed for backwards compatibility.
  2500. *
  2501. * @deprecated
  2502. *
  2503. * @type {Highcharts.CSSObject}
  2504. * @product highcharts highstock
  2505. * @apioption legend.style
  2506. */
  2507. /**
  2508. * CSS styles for each legend item. Only a subset of CSS is supported,
  2509. * notably those options related to text. The default `textOverflow`
  2510. * property makes long texts truncate. Set it to `undefined` to wrap
  2511. * text instead. A `width` property can be added to control the text
  2512. * width.
  2513. *
  2514. * @see In styled mode, the legend items can be styled with the
  2515. * `.highcharts-legend-item` class.
  2516. *
  2517. * @sample {highcharts} highcharts/legend/itemstyle/
  2518. * Bold black text
  2519. * @sample {highmaps} maps/legend/itemstyle/
  2520. * Item text styles
  2521. *
  2522. * @type {Highcharts.CSSObject}
  2523. * @default {"color": "#333333", "cursor": "pointer", "fontSize": "12px", "fontWeight": "bold", "textOverflow": "ellipsis"}
  2524. */
  2525. itemStyle: {
  2526. /**
  2527. * @ignore
  2528. */
  2529. color: '#333333',
  2530. /**
  2531. * @ignore
  2532. */
  2533. cursor: 'pointer',
  2534. /**
  2535. * @ignore
  2536. */
  2537. fontSize: '12px',
  2538. /**
  2539. * @ignore
  2540. */
  2541. fontWeight: 'bold',
  2542. /**
  2543. * @ignore
  2544. */
  2545. textOverflow: 'ellipsis'
  2546. },
  2547. /**
  2548. * CSS styles for each legend item in hover mode. Only a subset of
  2549. * CSS is supported, notably those options related to text. Properties
  2550. * are inherited from `style` unless overridden here.
  2551. *
  2552. * @see In styled mode, the hovered legend items can be styled with
  2553. * the `.highcharts-legend-item:hover` pesudo-class.
  2554. *
  2555. * @sample {highcharts} highcharts/legend/itemhoverstyle/
  2556. * Red on hover
  2557. * @sample {highmaps} maps/legend/itemstyle/
  2558. * Item text styles
  2559. *
  2560. * @type {Highcharts.CSSObject}
  2561. * @default {"color": "#000000"}
  2562. */
  2563. itemHoverStyle: {
  2564. /**
  2565. * @ignore
  2566. */
  2567. color: '#000000'
  2568. },
  2569. /**
  2570. * CSS styles for each legend item when the corresponding series or
  2571. * point is hidden. Only a subset of CSS is supported, notably those
  2572. * options related to text. Properties are inherited from `style`
  2573. * unless overridden here.
  2574. *
  2575. * @see In styled mode, the hidden legend items can be styled with
  2576. * the `.highcharts-legend-item-hidden` class.
  2577. *
  2578. * @sample {highcharts} highcharts/legend/itemhiddenstyle/
  2579. * Darker gray color
  2580. *
  2581. * @type {Highcharts.CSSObject}
  2582. * @default {"color": "#cccccc"}
  2583. */
  2584. itemHiddenStyle: {
  2585. /**
  2586. * @ignore
  2587. */
  2588. color: '#cccccc'
  2589. },
  2590. /**
  2591. * Whether to apply a drop shadow to the legend. A `backgroundColor`
  2592. * also needs to be applied for this to take effect. The shadow can be
  2593. * an object configuration containing `color`, `offsetX`, `offsetY`,
  2594. * `opacity` and `width`.
  2595. *
  2596. * @sample {highcharts} highcharts/legend/shadow/
  2597. * White background and drop shadow
  2598. * @sample {highstock} stock/legend/align/
  2599. * Various legend options
  2600. * @sample {highmaps} maps/legend/border-background/
  2601. * Border and background options
  2602. *
  2603. * @type {boolean|Highcharts.CSSObject}
  2604. */
  2605. shadow: false,
  2606. /**
  2607. * Default styling for the checkbox next to a legend item when
  2608. * `showCheckbox` is true.
  2609. *
  2610. * @type {Highcharts.CSSObject}
  2611. * @default {"width": "13px", "height": "13px", "position":"absolute"}
  2612. */
  2613. itemCheckboxStyle: {
  2614. /**
  2615. * @ignore
  2616. */
  2617. position: 'absolute',
  2618. /**
  2619. * @ignore
  2620. */
  2621. width: '13px',
  2622. /**
  2623. * @ignore
  2624. */
  2625. height: '13px'
  2626. },
  2627. // itemWidth: undefined,
  2628. /**
  2629. * When this is true, the legend symbol width will be the same as
  2630. * the symbol height, which in turn defaults to the font size of the
  2631. * legend items.
  2632. *
  2633. * @since 5.0.0
  2634. */
  2635. squareSymbol: true,
  2636. /**
  2637. * The pixel height of the symbol for series types that use a rectangle
  2638. * in the legend. Defaults to the font size of legend items.
  2639. *
  2640. * @productdesc {highmaps}
  2641. * In Highmaps, when the symbol is the gradient of a vertical color
  2642. * axis, the height defaults to 200.
  2643. *
  2644. * @sample {highmaps} maps/legend/layout-vertical-sized/
  2645. * Sized vertical gradient
  2646. * @sample {highmaps} maps/legend/padding-itemmargin/
  2647. * No distance between data classes
  2648. *
  2649. * @type {number}
  2650. * @since 3.0.8
  2651. * @apioption legend.symbolHeight
  2652. */
  2653. /**
  2654. * The border radius of the symbol for series types that use a rectangle
  2655. * in the legend. Defaults to half the `symbolHeight`.
  2656. *
  2657. * @sample {highcharts} highcharts/legend/symbolradius/
  2658. * Round symbols
  2659. * @sample {highstock} highcharts/legend/symbolradius/
  2660. * Round symbols
  2661. * @sample {highmaps} highcharts/legend/symbolradius/
  2662. * Round symbols
  2663. *
  2664. * @type {number}
  2665. * @since 3.0.8
  2666. * @apioption legend.symbolRadius
  2667. */
  2668. /**
  2669. * The pixel width of the legend item symbol. When the `squareSymbol`
  2670. * option is set, this defaults to the `symbolHeight`, otherwise 16.
  2671. *
  2672. * @productdesc {highmaps}
  2673. * In Highmaps, when the symbol is the gradient of a horizontal color
  2674. * axis, the width defaults to 200.
  2675. *
  2676. * @sample {highcharts} highcharts/legend/symbolwidth/
  2677. * Greater symbol width and padding
  2678. * @sample {highmaps} maps/legend/padding-itemmargin/
  2679. * Padding and item margins demonstrated
  2680. * @sample {highmaps} maps/legend/layout-vertical-sized/
  2681. * Sized vertical gradient
  2682. *
  2683. * @type {number}
  2684. * @apioption legend.symbolWidth
  2685. */
  2686. /**
  2687. * Whether to [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)
  2688. * to render the legend item texts.
  2689. *
  2690. * Prior to 4.1.7, when using HTML, [legend.navigation](
  2691. * #legend.navigation) was disabled.
  2692. *
  2693. * @type {boolean}
  2694. * @default false
  2695. * @apioption legend.useHTML
  2696. */
  2697. /**
  2698. * The width of the legend box. If a number is set, it translates to
  2699. * pixels. Since v7.0.2 it allows setting a percent string of the full
  2700. * chart width, for example `40%`.
  2701. *
  2702. * Defaults to the full chart width for legends below or above the
  2703. * chart, half the chart width for legends to the left and right.
  2704. *
  2705. * @sample {highcharts} highcharts/legend/width/
  2706. * Aligned to the plot area
  2707. * @sample {highcharts} highcharts/legend/width-percent/
  2708. * A percent of the chart width
  2709. *
  2710. * @type {number|string}
  2711. * @since 2.0
  2712. * @apioption legend.width
  2713. */
  2714. /**
  2715. * The pixel padding between the legend item symbol and the legend
  2716. * item text.
  2717. *
  2718. * @sample {highcharts} highcharts/legend/symbolpadding/
  2719. * Greater symbol width and padding
  2720. */
  2721. symbolPadding: 5,
  2722. /**
  2723. * The vertical alignment of the legend box. Can be one of `top`,
  2724. * `middle` or `bottom`. Vertical position can be further determined
  2725. * by the `y` option.
  2726. *
  2727. * In the case that the legend is aligned in a corner position, the
  2728. * `layout` option will determine whether to place it above/below
  2729. * or on the side of the plot area.
  2730. *
  2731. * When the [layout](#legend.layout) option is `proximate`, the
  2732. * `verticalAlign` option doesn't apply.
  2733. *
  2734. * @sample {highcharts} highcharts/legend/verticalalign/
  2735. * Legend 100px from the top of the chart
  2736. * @sample {highstock} stock/legend/align/
  2737. * Various legend options
  2738. * @sample {highmaps} maps/legend/alignment/
  2739. * Legend alignment
  2740. *
  2741. * @type {Highcharts.VerticalAlignValue}
  2742. * @since 2.0
  2743. */
  2744. verticalAlign: 'bottom',
  2745. // width: undefined,
  2746. /**
  2747. * The x offset of the legend relative to its horizontal alignment
  2748. * `align` within chart.spacingLeft and chart.spacingRight. Negative
  2749. * x moves it to the left, positive x moves it to the right.
  2750. *
  2751. * @sample {highcharts} highcharts/legend/width/
  2752. * Aligned to the plot area
  2753. *
  2754. * @since 2.0
  2755. */
  2756. x: 0,
  2757. /**
  2758. * The vertical offset of the legend relative to it's vertical alignment
  2759. * `verticalAlign` within chart.spacingTop and chart.spacingBottom.
  2760. * Negative y moves it up, positive y moves it down.
  2761. *
  2762. * @sample {highcharts} highcharts/legend/verticalalign/
  2763. * Legend 100px from the top of the chart
  2764. * @sample {highstock} stock/legend/align/
  2765. * Various legend options
  2766. * @sample {highmaps} maps/legend/alignment/
  2767. * Legend alignment
  2768. *
  2769. * @since 2.0
  2770. */
  2771. y: 0,
  2772. /**
  2773. * A title to be added on top of the legend.
  2774. *
  2775. * @sample {highcharts} highcharts/legend/title/
  2776. * Legend title
  2777. * @sample {highmaps} maps/legend/alignment/
  2778. * Legend with title
  2779. *
  2780. * @since 3.0
  2781. */
  2782. title: {
  2783. /**
  2784. * A text or HTML string for the title.
  2785. *
  2786. * @type {string}
  2787. * @since 3.0
  2788. * @apioption legend.title.text
  2789. */
  2790. /**
  2791. * Generic CSS styles for the legend title.
  2792. *
  2793. * @see In styled mode, the legend title is styled with the
  2794. * `.highcharts-legend-title` class.
  2795. *
  2796. * @type {Highcharts.CSSObject}
  2797. * @default {"fontWeight": "bold"}
  2798. * @since 3.0
  2799. */
  2800. style: {
  2801. /**
  2802. * @ignore
  2803. */
  2804. fontWeight: 'bold'
  2805. }
  2806. }
  2807. },
  2808. /**
  2809. * The loading options control the appearance of the loading screen
  2810. * that covers the plot area on chart operations. This screen only
  2811. * appears after an explicit call to `chart.showLoading()`. It is a
  2812. * utility for developers to communicate to the end user that something
  2813. * is going on, for example while retrieving new data via an XHR connection.
  2814. * The "Loading..." text itself is not part of this configuration
  2815. * object, but part of the `lang` object.
  2816. */
  2817. loading: {
  2818. /**
  2819. * The duration in milliseconds of the fade out effect.
  2820. *
  2821. * @sample highcharts/loading/hideduration/
  2822. * Fade in and out over a second
  2823. *
  2824. * @type {number}
  2825. * @default 100
  2826. * @since 1.2.0
  2827. * @apioption loading.hideDuration
  2828. */
  2829. /**
  2830. * The duration in milliseconds of the fade in effect.
  2831. *
  2832. * @sample highcharts/loading/hideduration/
  2833. * Fade in and out over a second
  2834. *
  2835. * @type {number}
  2836. * @default 100
  2837. * @since 1.2.0
  2838. * @apioption loading.showDuration
  2839. */
  2840. /**
  2841. * CSS styles for the loading label `span`.
  2842. *
  2843. * @see In styled mode, the loading label is styled with the
  2844. * `.highcharts-loading-inner` class.
  2845. *
  2846. * @sample {highcharts|highmaps} highcharts/loading/labelstyle/
  2847. * Vertically centered
  2848. * @sample {highstock} stock/loading/general/
  2849. * Label styles
  2850. *
  2851. * @type {Highcharts.CSSObject}
  2852. * @default {"fontWeight": "bold", "position": "relative", "top": "45%"}
  2853. * @since 1.2.0
  2854. */
  2855. labelStyle: {
  2856. /**
  2857. * @ignore
  2858. */
  2859. fontWeight: 'bold',
  2860. /**
  2861. * @ignore
  2862. */
  2863. position: 'relative',
  2864. /**
  2865. * @ignore
  2866. */
  2867. top: '45%'
  2868. },
  2869. /**
  2870. * CSS styles for the loading screen that covers the plot area.
  2871. *
  2872. * In styled mode, the loading label is styled with the
  2873. * `.highcharts-loading` class.
  2874. *
  2875. * @sample {highcharts|highmaps} highcharts/loading/style/
  2876. * Gray plot area, white text
  2877. * @sample {highstock} stock/loading/general/
  2878. * Gray plot area, white text
  2879. *
  2880. * @type {Highcharts.CSSObject}
  2881. * @default {"position": "absolute", "backgroundColor": "#ffffff", "opacity": 0.5, "textAlign": "center"}
  2882. * @since 1.2.0
  2883. */
  2884. style: {
  2885. /**
  2886. * @ignore
  2887. */
  2888. position: 'absolute',
  2889. /**
  2890. * @ignore
  2891. */
  2892. backgroundColor: '#ffffff',
  2893. /**
  2894. * @ignore
  2895. */
  2896. opacity: 0.5,
  2897. /**
  2898. * @ignore
  2899. */
  2900. textAlign: 'center'
  2901. }
  2902. },
  2903. /**
  2904. * Options for the tooltip that appears when the user hovers over a
  2905. * series or point.
  2906. *
  2907. * @declare Highcharts.TooltipOptions
  2908. */
  2909. tooltip: {
  2910. /**
  2911. * The color of the tooltip border. When `undefined`, the border takes
  2912. * the color of the corresponding series or point.
  2913. *
  2914. * @sample {highcharts} highcharts/tooltip/bordercolor-default/
  2915. * Follow series by default
  2916. * @sample {highcharts} highcharts/tooltip/bordercolor-black/
  2917. * Black border
  2918. * @sample {highstock} stock/tooltip/general/
  2919. * Styled tooltip
  2920. * @sample {highmaps} maps/tooltip/background-border/
  2921. * Background and border demo
  2922. *
  2923. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  2924. * @apioption tooltip.borderColor
  2925. */
  2926. /**
  2927. * A CSS class name to apply to the tooltip's container div,
  2928. * allowing unique CSS styling for each chart.
  2929. *
  2930. * @type {string}
  2931. * @apioption tooltip.className
  2932. */
  2933. /**
  2934. * Since 4.1, the crosshair definitions are moved to the Axis object
  2935. * in order for a better separation from the tooltip. See
  2936. * [xAxis.crosshair](#xAxis.crosshair).
  2937. *
  2938. * @sample {highcharts} highcharts/tooltip/crosshairs-x/
  2939. * Enable a crosshair for the x value
  2940. *
  2941. * @deprecated
  2942. *
  2943. * @type {*}
  2944. * @default true
  2945. * @apioption tooltip.crosshairs
  2946. */
  2947. /**
  2948. * Distance from point to tooltip in pixels.
  2949. *
  2950. * @type {number}
  2951. * @default 16
  2952. * @apioption tooltip.distance
  2953. */
  2954. /**
  2955. * Whether the tooltip should follow the mouse as it moves across
  2956. * columns, pie slices and other point types with an extent.
  2957. * By default it behaves this way for pie, polygon, map, sankey
  2958. * and wordcloud series by override in the `plotOptions`
  2959. * for those series types.
  2960. *
  2961. * For touch moves to behave the same way, [followTouchMove](
  2962. * #tooltip.followTouchMove) must be `true` also.
  2963. *
  2964. * @type {boolean}
  2965. * @default {highcharts} false
  2966. * @default {highstock} false
  2967. * @default {highmaps} true
  2968. * @since 3.0
  2969. * @apioption tooltip.followPointer
  2970. */
  2971. /**
  2972. * Whether the tooltip should update as the finger moves on a touch
  2973. * device. If this is `true` and [chart.panning](#chart.panning) is
  2974. * set,`followTouchMove` will take over one-finger touches, so the user
  2975. * needs to use two fingers for zooming and panning.
  2976. *
  2977. * Note the difference to [followPointer](#tooltip.followPointer) that
  2978. * only defines the _position_ of the tooltip. If `followPointer` is
  2979. * false in for example a column series, the tooltip will show above or
  2980. * below the column, but as `followTouchMove` is true, the tooltip will
  2981. * jump from column to column as the user swipes across the plot area.
  2982. *
  2983. * @type {boolean}
  2984. * @default {highcharts} true
  2985. * @default {highstock} true
  2986. * @default {highmaps} false
  2987. * @since 3.0.1
  2988. * @apioption tooltip.followTouchMove
  2989. */
  2990. /**
  2991. * Callback function to format the text of the tooltip from scratch. In
  2992. * case of single or [shared](#tooltip.shared) tooltips, a string should
  2993. * be returned. In case of [split](#tooltip.split) tooltips, it should
  2994. * return an array where the first item is the header, and subsequent
  2995. * items are mapped to the points. Return `false` to disable tooltip for
  2996. * a specific point on series.
  2997. *
  2998. * A subset of HTML is supported. Unless `useHTML` is true, the HTML of
  2999. * the tooltip is parsed and converted to SVG, therefore this isn't a
  3000. * complete HTML renderer. The following HTML tags are supported: `b`,
  3001. * `br`, `em`, `i`, `span`, `strong`. Spans can be styled with a `style`
  3002. * attribute, but only text-related CSS, that is shared with SVG, is
  3003. * handled.
  3004. *
  3005. * The available data in the formatter differ a bit depending on whether
  3006. * the tooltip is shared or split, or belongs to a single point. In a
  3007. * shared/split tooltip, all properties except `x`, which is common for
  3008. * all points, are kept in an array, `this.points`.
  3009. *
  3010. * Available data are:
  3011. *
  3012. * - **this.percentage (not shared) /**
  3013. * **this.points[i].percentage (shared)**:
  3014. * Stacked series and pies only. The point's percentage of the total.
  3015. *
  3016. * - **this.point (not shared) / this.points[i].point (shared)**:
  3017. * The point object. The point name, if defined, is available through
  3018. * `this.point.name`.
  3019. *
  3020. * - **this.points**:
  3021. * In a shared tooltip, this is an array containing all other
  3022. * properties for each point.
  3023. *
  3024. * - **this.series (not shared) / this.points[i].series (shared)**:
  3025. * The series object. The series name is available through
  3026. * `this.series.name`.
  3027. *
  3028. * - **this.total (not shared) / this.points[i].total (shared)**:
  3029. * Stacked series only. The total value at this point's x value.
  3030. *
  3031. * - **this.x**:
  3032. * The x value. This property is the same regardless of the tooltip
  3033. * being shared or not.
  3034. *
  3035. * - **this.y (not shared) / this.points[i].y (shared)**:
  3036. * The y value.
  3037. *
  3038. * @sample {highcharts} highcharts/tooltip/formatter-simple/
  3039. * Simple string formatting
  3040. * @sample {highcharts} highcharts/tooltip/formatter-shared/
  3041. * Formatting with shared tooltip
  3042. * @sample {highcharts|highstock} highcharts/tooltip/formatter-split/
  3043. * Formatting with split tooltip
  3044. * @sample highcharts/tooltip/formatter-conditional-default/
  3045. * Extending default formatter
  3046. * @sample {highstock} stock/tooltip/formatter/
  3047. * Formatting with shared tooltip
  3048. * @sample {highmaps} maps/tooltip/formatter/
  3049. * String formatting
  3050. *
  3051. * @type {Highcharts.TooltipFormatterCallbackFunction}
  3052. * @apioption tooltip.formatter
  3053. */
  3054. /**
  3055. * Callback function to format the text of the tooltip for
  3056. * visible null points.
  3057. * Works analogously to [formatter](#tooltip.formatter).
  3058. *
  3059. * @sample highcharts/plotoptions/series-nullformat
  3060. * Format data label and tooltip for null point.
  3061. *
  3062. * @type {Highcharts.TooltipFormatterCallbackFunction}
  3063. * @apioption tooltip.nullFormatter
  3064. */
  3065. /**
  3066. * The number of milliseconds to wait until the tooltip is hidden when
  3067. * mouse out from a point or chart.
  3068. *
  3069. * @type {number}
  3070. * @default 500
  3071. * @since 3.0
  3072. * @apioption tooltip.hideDelay
  3073. */
  3074. /**
  3075. * Whether to allow the tooltip to render outside the chart's SVG
  3076. * element box. By default (`false`), the tooltip is rendered within the
  3077. * chart's SVG element, which results in the tooltip being aligned
  3078. * inside the chart area. For small charts, this may result in clipping
  3079. * or overlapping. When `true`, a separate SVG element is created and
  3080. * overlaid on the page, allowing the tooltip to be aligned inside the
  3081. * page itself.
  3082. *
  3083. * Defaults to `true` if `chart.scrollablePlotArea` is activated,
  3084. * otherwise `false`.
  3085. *
  3086. * @sample highcharts/tooltip/outside
  3087. * Small charts with tooltips outside
  3088. *
  3089. * @type {boolean|undefined}
  3090. * @default undefined
  3091. * @since 6.1.1
  3092. * @apioption tooltip.outside
  3093. */
  3094. /**
  3095. * A callback function for formatting the HTML output for a single point
  3096. * in the tooltip. Like the `pointFormat` string, but with more
  3097. * flexibility.
  3098. *
  3099. * @type {Highcharts.FormatterCallbackFunction<Highcharts.Point>}
  3100. * @since 4.1.0
  3101. * @context Highcharts.Point
  3102. * @apioption tooltip.pointFormatter
  3103. */
  3104. /**
  3105. * A callback function to place the tooltip in a default position. The
  3106. * callback receives three parameters: `labelWidth`, `labelHeight` and
  3107. * `point`, where point contains values for `plotX` and `plotY` telling
  3108. * where the reference point is in the plot area. Add `chart.plotLeft`
  3109. * and `chart.plotTop` to get the full coordinates.
  3110. *
  3111. * Since v7, when [tooltip.split](#tooltip.split) option is enabled,
  3112. * positioner is called for each of the boxes separately, including
  3113. * xAxis header. xAxis header is not a point, instead `point` argument
  3114. * contains info:
  3115. * `{ plotX: Number, plotY: Number, isHeader: Boolean }`
  3116. *
  3117. *
  3118. * The return should be an object containing x and y values, for example
  3119. * `{ x: 100, y: 100 }`.
  3120. *
  3121. * @sample {highcharts} highcharts/tooltip/positioner/
  3122. * A fixed tooltip position
  3123. * @sample {highstock} stock/tooltip/positioner/
  3124. * A fixed tooltip position on top of the chart
  3125. * @sample {highmaps} maps/tooltip/positioner/
  3126. * A fixed tooltip position
  3127. * @sample {highstock} stock/tooltip/split-positioner/
  3128. * Split tooltip with fixed positions
  3129. * @sample {highstock} stock/tooltip/positioner-scrollable-plotarea/
  3130. * Scrollable plot area combined with tooltip positioner
  3131. *
  3132. * @type {Highcharts.TooltipPositionerCallbackFunction}
  3133. * @since 2.2.4
  3134. * @apioption tooltip.positioner
  3135. */
  3136. /**
  3137. * The name of a symbol to use for the border around the tooltip. Can
  3138. * be one of: `"callout"`, `"circle"`, or `"square"`. When
  3139. * [tooltip.split](#tooltip.split)
  3140. * option is enabled, shape is applied to all boxes except header, which
  3141. * is controlled by
  3142. * [tooltip.headerShape](#tooltip.headerShape).
  3143. *
  3144. * Custom callbacks for symbol path generation can also be added to
  3145. * `Highcharts.SVGRenderer.prototype.symbols` the same way as for
  3146. * [series.marker.symbol](plotOptions.line.marker.symbol).
  3147. *
  3148. * @type {Highcharts.TooltipShapeValue}
  3149. * @default callout
  3150. * @since 4.0
  3151. * @apioption tooltip.shape
  3152. */
  3153. /**
  3154. * The name of a symbol to use for the border around the tooltip
  3155. * header. Applies only when [tooltip.split](#tooltip.split) is
  3156. * enabled.
  3157. *
  3158. * Custom callbacks for symbol path generation can also be added to
  3159. * `Highcharts.SVGRenderer.prototype.symbols` the same way as for
  3160. * [series.marker.symbol](plotOptions.line.marker.symbol).
  3161. *
  3162. * @see [tooltip.shape](#tooltip.shape)
  3163. *
  3164. * @sample {highstock} stock/tooltip/split-positioner/
  3165. * Different shapes for header and split boxes
  3166. *
  3167. * @type {Highcharts.TooltipShapeValue}
  3168. * @default callout
  3169. * @validvalue ["callout", "square"]
  3170. * @since 7.0
  3171. * @apioption tooltip.headerShape
  3172. */
  3173. /**
  3174. * When the tooltip is shared, the entire plot area will capture mouse
  3175. * movement or touch events. Tooltip texts for series types with ordered
  3176. * data (not pie, scatter, flags etc) will be shown in a single bubble.
  3177. * This is recommended for single series charts and for tablet/mobile
  3178. * optimized charts.
  3179. *
  3180. * See also [tooltip.split](#tooltip.split), that is better suited for
  3181. * charts with many series, especially line-type series. The
  3182. * `tooltip.split` option takes precedence over `tooltip.shared`.
  3183. *
  3184. * @sample {highcharts} highcharts/tooltip/shared-false/
  3185. * False by default
  3186. * @sample {highcharts} highcharts/tooltip/shared-true/
  3187. * True
  3188. * @sample {highcharts} highcharts/tooltip/shared-x-crosshair/
  3189. * True with x axis crosshair
  3190. * @sample {highcharts} highcharts/tooltip/shared-true-mixed-types/
  3191. * True with mixed series types
  3192. *
  3193. * @type {boolean}
  3194. * @default false
  3195. * @since 2.1
  3196. * @product highcharts highstock
  3197. * @apioption tooltip.shared
  3198. */
  3199. /**
  3200. * Split the tooltip into one label per series, with the header close
  3201. * to the axis. This is recommended over [shared](#tooltip.shared)
  3202. * tooltips for charts with multiple line series, generally making them
  3203. * easier to read. This option takes precedence over `tooltip.shared`.
  3204. *
  3205. * @productdesc {highstock} In Highstock, tooltips are split by default
  3206. * since v6.0.0. Stock charts typically contain multi-dimension points
  3207. * and multiple panes, making split tooltips the preferred layout over
  3208. * the previous `shared` tooltip.
  3209. *
  3210. * @sample highcharts/tooltip/split/
  3211. * Split tooltip
  3212. * @sample {highcharts|highstock} highcharts/tooltip/formatter-split/
  3213. * Split tooltip and custom formatter callback
  3214. *
  3215. * @type {boolean}
  3216. * @default {highcharts} false
  3217. * @default {highstock} true
  3218. * @since 5.0.0
  3219. * @product highcharts highstock
  3220. * @apioption tooltip.split
  3221. */
  3222. /**
  3223. * Prevents the tooltip from switching or closing, when touched or
  3224. * pointed.
  3225. *
  3226. * @sample highcharts/tooltip/stickoncontact/
  3227. * Tooltip sticks on pointer contact
  3228. *
  3229. * @type {boolean}
  3230. * @since 8.0.1
  3231. * @apioption tooltip.stickOnContact
  3232. */
  3233. /**
  3234. * Use HTML to render the contents of the tooltip instead of SVG. Using
  3235. * HTML allows advanced formatting like tables and images in the
  3236. * tooltip. It is also recommended for rtl languages as it works around
  3237. * rtl bugs in early Firefox.
  3238. *
  3239. * @sample {highcharts|highstock} highcharts/tooltip/footerformat/
  3240. * A table for value alignment
  3241. * @sample {highcharts|highstock} highcharts/tooltip/fullhtml/
  3242. * Full HTML tooltip
  3243. * @sample {highmaps} maps/tooltip/usehtml/
  3244. * Pure HTML tooltip
  3245. *
  3246. * @type {boolean}
  3247. * @default false
  3248. * @since 2.2
  3249. * @apioption tooltip.useHTML
  3250. */
  3251. /**
  3252. * How many decimals to show in each series' y value. This is
  3253. * overridable in each series' tooltip options object. The default is to
  3254. * preserve all decimals.
  3255. *
  3256. * @sample {highcharts|highstock} highcharts/tooltip/valuedecimals/
  3257. * Set decimals, prefix and suffix for the value
  3258. * @sample {highmaps} maps/tooltip/valuedecimals/
  3259. * Set decimals, prefix and suffix for the value
  3260. *
  3261. * @type {number}
  3262. * @since 2.2
  3263. * @apioption tooltip.valueDecimals
  3264. */
  3265. /**
  3266. * A string to prepend to each series' y value. Overridable in each
  3267. * series' tooltip options object.
  3268. *
  3269. * @sample {highcharts|highstock} highcharts/tooltip/valuedecimals/
  3270. * Set decimals, prefix and suffix for the value
  3271. * @sample {highmaps} maps/tooltip/valuedecimals/
  3272. * Set decimals, prefix and suffix for the value
  3273. *
  3274. * @type {string}
  3275. * @since 2.2
  3276. * @apioption tooltip.valuePrefix
  3277. */
  3278. /**
  3279. * A string to append to each series' y value. Overridable in each
  3280. * series' tooltip options object.
  3281. *
  3282. * @sample {highcharts|highstock} highcharts/tooltip/valuedecimals/
  3283. * Set decimals, prefix and suffix for the value
  3284. * @sample {highmaps} maps/tooltip/valuedecimals/
  3285. * Set decimals, prefix and suffix for the value
  3286. *
  3287. * @type {string}
  3288. * @since 2.2
  3289. * @apioption tooltip.valueSuffix
  3290. */
  3291. /**
  3292. * The format for the date in the tooltip header if the X axis is a
  3293. * datetime axis. The default is a best guess based on the smallest
  3294. * distance between points in the chart.
  3295. *
  3296. * @sample {highcharts} highcharts/tooltip/xdateformat/
  3297. * A different format
  3298. *
  3299. * @type {string}
  3300. * @product highcharts highstock gantt
  3301. * @apioption tooltip.xDateFormat
  3302. */
  3303. /**
  3304. * How many decimals to show for the `point.change` value when the
  3305. * `series.compare` option is set. This is overridable in each series'
  3306. * tooltip options object. The default is to preserve all decimals.
  3307. *
  3308. * @type {number}
  3309. * @since 1.0.1
  3310. * @product highstock
  3311. * @apioption tooltip.changeDecimals
  3312. */
  3313. /**
  3314. * Enable or disable the tooltip.
  3315. *
  3316. * @sample {highcharts} highcharts/tooltip/enabled/
  3317. * Disabled
  3318. * @sample {highcharts} highcharts/plotoptions/series-point-events-mouseover/
  3319. * Disable tooltip and show values on chart instead
  3320. */
  3321. enabled: true,
  3322. /**
  3323. * Enable or disable animation of the tooltip.
  3324. *
  3325. * @type {boolean}
  3326. * @default true
  3327. * @since 2.3.0
  3328. */
  3329. animation: svg,
  3330. /**
  3331. * The radius of the rounded border corners.
  3332. *
  3333. * @sample {highcharts} highcharts/tooltip/bordercolor-default/
  3334. * 5px by default
  3335. * @sample {highcharts} highcharts/tooltip/borderradius-0/
  3336. * Square borders
  3337. * @sample {highmaps} maps/tooltip/background-border/
  3338. * Background and border demo
  3339. */
  3340. borderRadius: 3,
  3341. /**
  3342. * For series on a datetime axes, the date format in the tooltip's
  3343. * header will by default be guessed based on the closest data points.
  3344. * This member gives the default string representations used for
  3345. * each unit. For an overview of the replacement codes, see
  3346. * [dateFormat](/class-reference/Highcharts#dateFormat).
  3347. *
  3348. * @see [xAxis.dateTimeLabelFormats](#xAxis.dateTimeLabelFormats)
  3349. *
  3350. * @type {Highcharts.Dictionary<string>}
  3351. * @product highcharts highstock gantt
  3352. */
  3353. dateTimeLabelFormats: {
  3354. /** @internal */
  3355. millisecond: '%A, %b %e, %H:%M:%S.%L',
  3356. /** @internal */
  3357. second: '%A, %b %e, %H:%M:%S',
  3358. /** @internal */
  3359. minute: '%A, %b %e, %H:%M',
  3360. /** @internal */
  3361. hour: '%A, %b %e, %H:%M',
  3362. /** @internal */
  3363. day: '%A, %b %e, %Y',
  3364. /** @internal */
  3365. week: 'Week from %A, %b %e, %Y',
  3366. /** @internal */
  3367. month: '%B %Y',
  3368. /** @internal */
  3369. year: '%Y'
  3370. },
  3371. /**
  3372. * A string to append to the tooltip format.
  3373. *
  3374. * @sample {highcharts} highcharts/tooltip/footerformat/
  3375. * A table for value alignment
  3376. * @sample {highmaps} maps/tooltip/format/
  3377. * Format demo
  3378. *
  3379. * @since 2.2
  3380. */
  3381. footerFormat: '',
  3382. /**
  3383. * Padding inside the tooltip, in pixels.
  3384. *
  3385. * @since 5.0.0
  3386. */
  3387. padding: 8,
  3388. /**
  3389. * Proximity snap for graphs or single points. It defaults to 10 for
  3390. * mouse-powered devices and 25 for touch devices.
  3391. *
  3392. * Note that in most cases the whole plot area captures the mouse
  3393. * movement, and in these cases `tooltip.snap` doesn't make sense. This
  3394. * applies when [stickyTracking](#plotOptions.series.stickyTracking)
  3395. * is `true` (default) and when the tooltip is [shared](#tooltip.shared)
  3396. * or [split](#tooltip.split).
  3397. *
  3398. * @sample {highcharts} highcharts/tooltip/bordercolor-default/
  3399. * 10 px by default
  3400. * @sample {highcharts} highcharts/tooltip/snap-50/
  3401. * 50 px on graph
  3402. *
  3403. * @type {number}
  3404. * @default 10/25
  3405. * @since 1.2.0
  3406. * @product highcharts highstock
  3407. */
  3408. snap: isTouchDevice ? 25 : 10,
  3409. /**
  3410. * The HTML of the tooltip header line. Variables are enclosed by
  3411. * curly brackets. Available variables are `point.key`, `series.name`,
  3412. * `series.color` and other members from the `point` and `series`
  3413. * objects. The `point.key` variable contains the category name, x
  3414. * value or datetime string depending on the type of axis. For datetime
  3415. * axes, the `point.key` date format can be set using
  3416. * `tooltip.xDateFormat`.
  3417. *
  3418. * @sample {highcharts} highcharts/tooltip/footerformat/
  3419. * An HTML table in the tooltip
  3420. * @sample {highstock} highcharts/tooltip/footerformat/
  3421. * An HTML table in the tooltip
  3422. * @sample {highmaps} maps/tooltip/format/
  3423. * Format demo
  3424. *
  3425. * @type {string}
  3426. * @apioption tooltip.headerFormat
  3427. */
  3428. headerFormat: '<span style="font-size: 10px">{point.key}</span><br/>',
  3429. /**
  3430. * The HTML of the null point's line in the tooltip. Works analogously
  3431. * to [pointFormat](#tooltip.pointFormat).
  3432. *
  3433. * @sample {highcharts} highcharts/plotoptions/series-nullformat
  3434. * Format data label and tooltip for null point.
  3435. *
  3436. * @type {string}
  3437. * @apioption tooltip.nullFormat
  3438. */
  3439. /**
  3440. * The HTML of the point's line in the tooltip. Variables are enclosed
  3441. * by curly brackets. Available variables are point.x, point.y, series.
  3442. * name and series.color and other properties on the same form.
  3443. * Furthermore, `point.y` can be extended by the `tooltip.valuePrefix`
  3444. * and `tooltip.valueSuffix` variables. This can also be overridden for
  3445. * each series, which makes it a good hook for displaying units.
  3446. *
  3447. * In styled mode, the dot is colored by a class name rather
  3448. * than the point color.
  3449. *
  3450. * @sample {highcharts} highcharts/tooltip/pointformat/
  3451. * A different point format with value suffix
  3452. * @sample {highmaps} maps/tooltip/format/
  3453. * Format demo
  3454. *
  3455. * @type {string}
  3456. * @since 2.2
  3457. * @apioption tooltip.pointFormat
  3458. */
  3459. pointFormat: '<span style="color:{point.color}">\u25CF</span> {series.name}: <b>{point.y}</b><br/>',
  3460. /**
  3461. * The background color or gradient for the tooltip.
  3462. *
  3463. * In styled mode, the stroke width is set in the
  3464. * `.highcharts-tooltip-box` class.
  3465. *
  3466. * @sample {highcharts} highcharts/tooltip/backgroundcolor-solid/
  3467. * Yellowish background
  3468. * @sample {highcharts} highcharts/tooltip/backgroundcolor-gradient/
  3469. * Gradient
  3470. * @sample {highcharts} highcharts/css/tooltip-border-background/
  3471. * Tooltip in styled mode
  3472. * @sample {highstock} stock/tooltip/general/
  3473. * Custom tooltip
  3474. * @sample {highstock} highcharts/css/tooltip-border-background/
  3475. * Tooltip in styled mode
  3476. * @sample {highmaps} maps/tooltip/background-border/
  3477. * Background and border demo
  3478. * @sample {highmaps} highcharts/css/tooltip-border-background/
  3479. * Tooltip in styled mode
  3480. *
  3481. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  3482. */
  3483. backgroundColor: color('#f7f7f7')
  3484. .setOpacity(0.85).get(),
  3485. /**
  3486. * The pixel width of the tooltip border.
  3487. *
  3488. * In styled mode, the stroke width is set in the
  3489. * `.highcharts-tooltip-box` class.
  3490. *
  3491. * @sample {highcharts} highcharts/tooltip/bordercolor-default/
  3492. * 2px by default
  3493. * @sample {highcharts} highcharts/tooltip/borderwidth/
  3494. * No border (shadow only)
  3495. * @sample {highcharts} highcharts/css/tooltip-border-background/
  3496. * Tooltip in styled mode
  3497. * @sample {highstock} stock/tooltip/general/
  3498. * Custom tooltip
  3499. * @sample {highstock} highcharts/css/tooltip-border-background/
  3500. * Tooltip in styled mode
  3501. * @sample {highmaps} maps/tooltip/background-border/
  3502. * Background and border demo
  3503. * @sample {highmaps} highcharts/css/tooltip-border-background/
  3504. * Tooltip in styled mode
  3505. */
  3506. borderWidth: 1,
  3507. /**
  3508. * Whether to apply a drop shadow to the tooltip.
  3509. *
  3510. * @sample {highcharts} highcharts/tooltip/bordercolor-default/
  3511. * True by default
  3512. * @sample {highcharts} highcharts/tooltip/shadow/
  3513. * False
  3514. * @sample {highmaps} maps/tooltip/positioner/
  3515. * Fixed tooltip position, border and shadow disabled
  3516. *
  3517. * @type {boolean|Highcharts.ShadowOptionsObject}
  3518. */
  3519. shadow: true,
  3520. /**
  3521. * CSS styles for the tooltip. The tooltip can also be styled through
  3522. * the CSS class `.highcharts-tooltip`.
  3523. *
  3524. * Note that the default `pointerEvents` style makes the tooltip ignore
  3525. * mouse events, so in order to use clickable tooltips, this value must
  3526. * be set to `auto`.
  3527. *
  3528. * @sample {highcharts} highcharts/tooltip/style/
  3529. * Greater padding, bold text
  3530. *
  3531. * @type {Highcharts.CSSObject}
  3532. */
  3533. style: {
  3534. /** @internal */
  3535. color: '#333333',
  3536. /** @internal */
  3537. cursor: 'default',
  3538. /** @internal */
  3539. fontSize: '12px',
  3540. /** @internal */
  3541. whiteSpace: 'nowrap'
  3542. }
  3543. },
  3544. /**
  3545. * Highchart by default puts a credits label in the lower right corner
  3546. * of the chart. This can be changed using these options.
  3547. */
  3548. credits: {
  3549. /**
  3550. * Credits for map source to be concatenated with conventional credit
  3551. * text. By default this is a format string that collects copyright
  3552. * information from the map if available.
  3553. *
  3554. * @see [mapTextFull](#credits.mapTextFull)
  3555. * @see [text](#credits.text)
  3556. *
  3557. * @type {string}
  3558. * @default \u00a9 <a href="{geojson.copyrightUrl}">{geojson.copyrightShort}</a>
  3559. * @since 4.2.2
  3560. * @product highmaps
  3561. * @apioption credits.mapText
  3562. */
  3563. /**
  3564. * Detailed credits for map source to be displayed on hover of credits
  3565. * text. By default this is a format string that collects copyright
  3566. * information from the map if available.
  3567. *
  3568. * @see [mapText](#credits.mapText)
  3569. * @see [text](#credits.text)
  3570. *
  3571. * @type {string}
  3572. * @default {geojson.copyright}
  3573. * @since 4.2.2
  3574. * @product highmaps
  3575. * @apioption credits.mapTextFull
  3576. */
  3577. /**
  3578. * Whether to show the credits text.
  3579. *
  3580. * @sample {highcharts} highcharts/credits/enabled-false/
  3581. * Credits disabled
  3582. * @sample {highstock} stock/credits/enabled/
  3583. * Credits disabled
  3584. * @sample {highmaps} maps/credits/enabled-false/
  3585. * Credits disabled
  3586. */
  3587. enabled: true,
  3588. /**
  3589. * The URL for the credits label.
  3590. *
  3591. * @sample {highcharts} highcharts/credits/href/
  3592. * Custom URL and text
  3593. * @sample {highmaps} maps/credits/customized/
  3594. * Custom URL and text
  3595. */
  3596. href: 'https://www.highcharts.com?credits',
  3597. /**
  3598. * Position configuration for the credits label.
  3599. *
  3600. * @sample {highcharts} highcharts/credits/position-left/
  3601. * Left aligned
  3602. * @sample {highcharts} highcharts/credits/position-left/
  3603. * Left aligned
  3604. * @sample {highmaps} maps/credits/customized/
  3605. * Left aligned
  3606. * @sample {highmaps} maps/credits/customized/
  3607. * Left aligned
  3608. *
  3609. * @type {Highcharts.AlignObject}
  3610. * @since 2.1
  3611. */
  3612. position: {
  3613. /** @internal */
  3614. align: 'right',
  3615. /** @internal */
  3616. x: -10,
  3617. /** @internal */
  3618. verticalAlign: 'bottom',
  3619. /** @internal */
  3620. y: -5
  3621. },
  3622. /**
  3623. * CSS styles for the credits label.
  3624. *
  3625. * @see In styled mode, credits styles can be set with the
  3626. * `.highcharts-credits` class.
  3627. *
  3628. * @type {Highcharts.CSSObject}
  3629. */
  3630. style: {
  3631. /** @internal */
  3632. cursor: 'pointer',
  3633. /** @internal */
  3634. color: '#999999',
  3635. /** @internal */
  3636. fontSize: '9px'
  3637. },
  3638. /**
  3639. * The text for the credits label.
  3640. *
  3641. * @productdesc {highmaps}
  3642. * If a map is loaded as GeoJSON, the text defaults to
  3643. * `Highcharts @ {map-credits}`. Otherwise, it defaults to
  3644. * `Highcharts.com`.
  3645. *
  3646. * @sample {highcharts} highcharts/credits/href/
  3647. * Custom URL and text
  3648. * @sample {highmaps} maps/credits/customized/
  3649. * Custom URL and text
  3650. */
  3651. text: 'Highcharts.com'
  3652. }
  3653. };
  3654. /* eslint-disable spaced-comment */
  3655. '';
  3656. /**
  3657. * Global `Time` object with default options. Since v6.0.5, time settings can be
  3658. * applied individually for each chart. If no individual settings apply, this
  3659. * `Time` object is shared by all instances.
  3660. *
  3661. * @name Highcharts.time
  3662. * @type {Highcharts.Time}
  3663. */
  3664. H.time = new Time(merge(H.defaultOptions.global, H.defaultOptions.time));
  3665. /**
  3666. * Formats a JavaScript date timestamp (milliseconds since Jan 1st 1970) into a
  3667. * human readable date string. The format is a subset of the formats for PHP's
  3668. * [strftime](https://www.php.net/manual/en/function.strftime.php) function.
  3669. * Additional formats can be given in the {@link Highcharts.dateFormats} hook.
  3670. *
  3671. * Since v6.0.5, all internal dates are formatted through the
  3672. * {@link Highcharts.Chart#time} instance to respect chart-level time settings.
  3673. * The `Highcharts.dateFormat` function only reflects global time settings set
  3674. * with `setOptions`.
  3675. *
  3676. * Supported format keys:
  3677. * - `%a`: Short weekday, like 'Mon'
  3678. * - `%A`: Long weekday, like 'Monday'
  3679. * - `%d`: Two digit day of the month, 01 to 31
  3680. * - `%e`: Day of the month, 1 through 31
  3681. * - `%w`: Day of the week, 0 through 6
  3682. * - `%b`: Short month, like 'Jan'
  3683. * - `%B`: Long month, like 'January'
  3684. * - `%m`: Two digit month number, 01 through 12
  3685. * - `%y`: Two digits year, like 09 for 2009
  3686. * - `%Y`: Four digits year, like 2009
  3687. * - `%H`: Two digits hours in 24h format, 00 through 23
  3688. * - `%k`: Hours in 24h format, 0 through 23
  3689. * - `%I`: Two digits hours in 12h format, 00 through 11
  3690. * - `%l`: Hours in 12h format, 1 through 12
  3691. * - `%M`: Two digits minutes, 00 through 59
  3692. * - `%p`: Upper case AM or PM
  3693. * - `%P`: Lower case AM or PM
  3694. * - `%S`: Two digits seconds, 00 through 59
  3695. * - `%L`: Milliseconds (naming from Ruby)
  3696. *
  3697. * @function Highcharts.dateFormat
  3698. *
  3699. * @param {string} format
  3700. * The desired format where various time representations are prefixed
  3701. * with `%`.
  3702. *
  3703. * @param {number} timestamp
  3704. * The JavaScript timestamp.
  3705. *
  3706. * @param {boolean} [capitalize=false]
  3707. * Upper case first letter in the return.
  3708. *
  3709. * @return {string}
  3710. * The formatted date.
  3711. */
  3712. H.dateFormat = function (format, timestamp, capitalize) {
  3713. return H.time.dateFormat(format, timestamp, capitalize);
  3714. };
  3715. var optionsModule = {
  3716. dateFormat: H.dateFormat,
  3717. defaultOptions: H.defaultOptions,
  3718. time: H.time
  3719. };
  3720. export default optionsModule;