ingred-ui 37.5.0-canary.0 → 37.5.0
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/components/Chart/internal/ChartAxis.d.ts +2 -0
- package/dist/components/Chart/internal/ChartScrollViewport.d.ts +1 -1
- package/dist/components/Chart/internal/getCategoryLabelPlacement.d.ts +22 -0
- package/dist/components/Chart/internal/getChartLayout.d.ts +1 -0
- package/dist/index.es.js +493 -493
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +538 -538
- package/dist/index.js.map +1 -1
- package/dist/themes/palette.d.ts +3 -1
- package/package.json +22 -32
|
@@ -24,9 +24,11 @@ export declare const ChartValueAxis: React.FC<ChartValueAxisProps>;
|
|
|
24
24
|
type ChartCategoryLabelsProps = {
|
|
25
25
|
orientation: BarChartOrientation;
|
|
26
26
|
labels: string[];
|
|
27
|
+
width: number;
|
|
27
28
|
height: number;
|
|
28
29
|
paddingBottom: number;
|
|
29
30
|
paddingLeft: number;
|
|
31
|
+
paddingRight: number;
|
|
30
32
|
paddingTop: number;
|
|
31
33
|
slotWidth: number;
|
|
32
34
|
labelEvery: number;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type CategoryLabelPlacement = {
|
|
2
|
+
x: number;
|
|
3
|
+
textAnchor: "start" | "middle";
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* 文字幅の見積もり。日付のような ASCII は fontSize の 0.62 倍、
|
|
7
|
+
* それ以外は fontSize と同じ幅として扱う。
|
|
8
|
+
*/
|
|
9
|
+
export declare function estimateCategoryLabelWidth(label: string, fontSize: number): number;
|
|
10
|
+
/**
|
|
11
|
+
* 縦グラフのカテゴリラベルを、左右の余白にはみ出さない位置に置く。
|
|
12
|
+
* 収まるときはスロット中央。はみ出す分だけ内側へずらす。
|
|
13
|
+
*/
|
|
14
|
+
export declare function getVerticalCategoryLabelPlacement({ label, index, slotWidth, paddingLeft, paddingRight, width, fontSize, }: {
|
|
15
|
+
label: string;
|
|
16
|
+
index: number;
|
|
17
|
+
slotWidth: number;
|
|
18
|
+
paddingLeft: number;
|
|
19
|
+
paddingRight: number;
|
|
20
|
+
width: number;
|
|
21
|
+
fontSize: number;
|
|
22
|
+
}): CategoryLabelPlacement;
|