* Helper to get the reset model for the tooltip * @param tooltipOpts {object} the tooltip options
(tooltipOpts)
| 8361 | * @param tooltipOpts {object} the tooltip options |
| 8362 | */ |
| 8363 | function getBaseModel(tooltipOpts) { |
| 8364 | var globalDefaults = core_defaults.global; |
| 8365 | |
| 8366 | return { |
| 8367 | // Positioning |
| 8368 | xPadding: tooltipOpts.xPadding, |
| 8369 | yPadding: tooltipOpts.yPadding, |
| 8370 | xAlign: tooltipOpts.xAlign, |
| 8371 | yAlign: tooltipOpts.yAlign, |
| 8372 | |
| 8373 | // Drawing direction and text direction |
| 8374 | rtl: tooltipOpts.rtl, |
| 8375 | textDirection: tooltipOpts.textDirection, |
| 8376 | |
| 8377 | // Body |
| 8378 | bodyFontColor: tooltipOpts.bodyFontColor, |
| 8379 | _bodyFontFamily: valueOrDefault$8(tooltipOpts.bodyFontFamily, globalDefaults.defaultFontFamily), |
| 8380 | _bodyFontStyle: valueOrDefault$8(tooltipOpts.bodyFontStyle, globalDefaults.defaultFontStyle), |
| 8381 | _bodyAlign: tooltipOpts.bodyAlign, |
| 8382 | bodyFontSize: valueOrDefault$8(tooltipOpts.bodyFontSize, globalDefaults.defaultFontSize), |
| 8383 | bodySpacing: tooltipOpts.bodySpacing, |
| 8384 | |
| 8385 | // Title |
| 8386 | titleFontColor: tooltipOpts.titleFontColor, |
| 8387 | _titleFontFamily: valueOrDefault$8(tooltipOpts.titleFontFamily, globalDefaults.defaultFontFamily), |
| 8388 | _titleFontStyle: valueOrDefault$8(tooltipOpts.titleFontStyle, globalDefaults.defaultFontStyle), |
| 8389 | titleFontSize: valueOrDefault$8(tooltipOpts.titleFontSize, globalDefaults.defaultFontSize), |
| 8390 | _titleAlign: tooltipOpts.titleAlign, |
| 8391 | titleSpacing: tooltipOpts.titleSpacing, |
| 8392 | titleMarginBottom: tooltipOpts.titleMarginBottom, |
| 8393 | |
| 8394 | // Footer |
| 8395 | footerFontColor: tooltipOpts.footerFontColor, |
| 8396 | _footerFontFamily: valueOrDefault$8(tooltipOpts.footerFontFamily, globalDefaults.defaultFontFamily), |
| 8397 | _footerFontStyle: valueOrDefault$8(tooltipOpts.footerFontStyle, globalDefaults.defaultFontStyle), |
| 8398 | footerFontSize: valueOrDefault$8(tooltipOpts.footerFontSize, globalDefaults.defaultFontSize), |
| 8399 | _footerAlign: tooltipOpts.footerAlign, |
| 8400 | footerSpacing: tooltipOpts.footerSpacing, |
| 8401 | footerMarginTop: tooltipOpts.footerMarginTop, |
| 8402 | |
| 8403 | // Appearance |
| 8404 | caretSize: tooltipOpts.caretSize, |
| 8405 | cornerRadius: tooltipOpts.cornerRadius, |
| 8406 | backgroundColor: tooltipOpts.backgroundColor, |
| 8407 | opacity: 0, |
| 8408 | legendColorBackground: tooltipOpts.multiKeyBackground, |
| 8409 | displayColors: tooltipOpts.displayColors, |
| 8410 | borderColor: tooltipOpts.borderColor, |
| 8411 | borderWidth: tooltipOpts.borderWidth |
| 8412 | }; |
| 8413 | } |
| 8414 | |
| 8415 | /** |
| 8416 | * Get the size of the tooltip |