@toast-ui/chart
Advanced tools
Comparing version 4.0.0-beta.0 to 4.0.0-beta.1
@@ -7,3 +7,2 @@ import * as arrayUtil from './arrayUtil'; | ||
export const LABEL_ANCHOR_POINT = crispPixel(TICK_SIZE * 2 + getTextHeight(DEFAULT_LABEL_TEXT) / 2); | ||
let ctx; | ||
function getDecimalLength(value) { | ||
@@ -138,5 +137,3 @@ var _a, _b; | ||
export function getTextWidth(text, font = DEFAULT_LABEL_TEXT) { | ||
if (!ctx) { | ||
ctx = document.createElement('canvas').getContext('2d'); | ||
} | ||
const ctx = document.createElement('canvas').getContext('2d'); | ||
ctx.font = font; | ||
@@ -146,5 +143,3 @@ return Math.ceil(ctx.measureText(text).width); | ||
export function getTextHeight(font = DEFAULT_LABEL_TEXT) { | ||
if (!ctx) { | ||
ctx = document.createElement('canvas').getContext('2d'); | ||
} | ||
const ctx = document.createElement('canvas').getContext('2d'); | ||
ctx.font = font; | ||
@@ -151,0 +146,0 @@ const matches = ctx.font.match(/\d+/); |
/*! | ||
* TOAST UI Chart 4th Edition | ||
* @version 4.0.0-beta.0 | Thu Dec 10 2020 | ||
* @version 4.0.0-beta.1 | Thu Dec 10 2020 | ||
* @author NHN. FE Development Lab <dl_javascript@nhn.com> | ||
@@ -5,0 +5,0 @@ * @license MIT |
{ | ||
"name": "@toast-ui/chart", | ||
"version": "4.0.0-beta.0", | ||
"version": "4.0.0-beta.1", | ||
"description": "TOAST UI Application: Chart", | ||
@@ -5,0 +5,0 @@ "main": "dist/toastui-chart.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1227557
20948