Options.js 130 KB

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