Options.js 142 KB

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