@opendata-ai/openchart-core 6.19.0 → 6.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/layout/text-measure.ts +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -2779,7 +2779,7 @@ declare function estimateTextWidth(text: string, fontSize: number, fontWeight?:
|
|
|
2779
2779
|
* so adjacent text doesn't crowd it. Used by chrome and legend layout to avoid
|
|
2780
2780
|
* overlapping the brand.
|
|
2781
2781
|
*/
|
|
2782
|
-
declare const BRAND_RESERVE_WIDTH =
|
|
2782
|
+
declare const BRAND_RESERVE_WIDTH = 130;
|
|
2783
2783
|
/** Font size of the brand watermark (px). Shared between layout and renderer. */
|
|
2784
2784
|
declare const BRAND_FONT_SIZE = 12;
|
|
2785
2785
|
/** Minimum chart width to render the brand watermark (px). */
|
package/dist/index.js
CHANGED
|
@@ -1031,7 +1031,7 @@ function resolveTheme(userTheme, base = DEFAULT_THEME) {
|
|
|
1031
1031
|
}
|
|
1032
1032
|
|
|
1033
1033
|
// src/layout/text-measure.ts
|
|
1034
|
-
var AVG_CHAR_WIDTH_RATIO = 0.
|
|
1034
|
+
var AVG_CHAR_WIDTH_RATIO = 0.57;
|
|
1035
1035
|
var WEIGHT_ADJUSTMENT = {
|
|
1036
1036
|
100: 0.9,
|
|
1037
1037
|
200: 0.92,
|
|
@@ -1058,7 +1058,7 @@ function estimateTextWidth(text, fontSize, fontWeight = 400) {
|
|
|
1058
1058
|
}
|
|
1059
1059
|
return text.length * charWidth;
|
|
1060
1060
|
}
|
|
1061
|
-
var BRAND_RESERVE_WIDTH =
|
|
1061
|
+
var BRAND_RESERVE_WIDTH = 130;
|
|
1062
1062
|
var BRAND_FONT_SIZE = 12;
|
|
1063
1063
|
var BRAND_MIN_WIDTH = 120;
|
|
1064
1064
|
function estimateTextHeight(fontSize, lineCount = 1, lineHeight = 1.3) {
|