2
0

Options.js 141 KB

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