Options.js 141 KB

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