Options.js 136 KB

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