@tekkare/romulus 0.1.40 → 0.1.41
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/module.json
CHANGED
|
@@ -136,13 +136,21 @@ export interface RmSeriesInput {
|
|
|
136
136
|
/** Bar chart vertical, une ou plusieurs series, empilable. */
|
|
137
137
|
export declare function rmBarVerticalOption(categories: (string | number)[], series: RmSeriesInput[], theme: RmChartTheme, palette: string[], decal?: boolean): {
|
|
138
138
|
legend: {
|
|
139
|
-
|
|
139
|
+
bottom: number;
|
|
140
|
+
left: string;
|
|
140
141
|
textStyle: {
|
|
141
142
|
color: string;
|
|
142
143
|
fontSize: number;
|
|
143
144
|
fontFamily: string;
|
|
144
145
|
};
|
|
145
146
|
} | undefined;
|
|
147
|
+
grid: {
|
|
148
|
+
bottom: number;
|
|
149
|
+
left: number;
|
|
150
|
+
right: number;
|
|
151
|
+
top: number;
|
|
152
|
+
containLabel: boolean;
|
|
153
|
+
};
|
|
146
154
|
xAxis: {
|
|
147
155
|
splitLine: {
|
|
148
156
|
show: boolean;
|
|
@@ -199,13 +207,6 @@ export declare function rmBarVerticalOption(categories: (string | number)[], ser
|
|
|
199
207
|
textStyle: {
|
|
200
208
|
fontFamily: string;
|
|
201
209
|
};
|
|
202
|
-
grid: {
|
|
203
|
-
left: number;
|
|
204
|
-
right: number;
|
|
205
|
-
top: number;
|
|
206
|
-
bottom: number;
|
|
207
|
-
containLabel: boolean;
|
|
208
|
-
};
|
|
209
210
|
tooltip: {
|
|
210
211
|
trigger: string;
|
|
211
212
|
backgroundColor: string;
|
|
@@ -325,7 +326,12 @@ export declare function rmLineOption(categories: (string | number)[], series: Rm
|
|
|
325
326
|
* graphe ne porte plus aucun chiffre.
|
|
326
327
|
*/
|
|
327
328
|
hideValueAxis?: boolean;
|
|
328
|
-
/**
|
|
329
|
+
/**
|
|
330
|
+
* Position de la legende. Par defaut sous le graphe : la carte porte deja
|
|
331
|
+
* son titre en haut, et une legende juste dessous se lit comme un
|
|
332
|
+
* sous-titre. En bas, elle se lit comme ce qu'elle est, la cle des
|
|
333
|
+
* couleurs, une fois la courbe regardee.
|
|
334
|
+
*/
|
|
329
335
|
legendPosition?: 'top' | 'bottom';
|
|
330
336
|
/**
|
|
331
337
|
* Ancre l'axe a zero quand toutes les valeurs sont positives. Sans ca
|
|
@@ -120,7 +120,10 @@ const axisCommon = (theme) => ({
|
|
|
120
120
|
export function rmBarVerticalOption(categories, series, theme, palette, decal = false) {
|
|
121
121
|
return {
|
|
122
122
|
...rmBaseOption(theme, decal),
|
|
123
|
-
legend: series.length > 1 ? {
|
|
123
|
+
legend: series.length > 1 ? { bottom: 0, left: "center", textStyle: { color: theme.mutedColor, fontSize: 11, fontFamily: FONT } } : void 0,
|
|
124
|
+
// La legende passee sous le graphe prend sa place dans la gouttiere basse,
|
|
125
|
+
// sinon elle recouvre les libelles de l'axe des abscisses.
|
|
126
|
+
grid: { ...rmBaseOption(theme, decal).grid, bottom: series.length > 1 ? 56 : 36 },
|
|
124
127
|
xAxis: { type: "category", data: categories, ...axisCommon(theme), splitLine: { show: false } },
|
|
125
128
|
yAxis: { type: "value", ...axisCommon(theme) },
|
|
126
129
|
series: series.map((s, i) => ({
|
|
@@ -165,7 +168,7 @@ export function rmLineOption(categories, series, theme, palette, options = {}) {
|
|
|
165
168
|
axisLabels,
|
|
166
169
|
valueLabels = false,
|
|
167
170
|
hideValueAxis = false,
|
|
168
|
-
legendPosition = "
|
|
171
|
+
legendPosition = "bottom",
|
|
169
172
|
startAtZero = false,
|
|
170
173
|
valueFormatter
|
|
171
174
|
} = options;
|
|
@@ -222,7 +225,9 @@ export function rmLineOption(categories, series, theme, palette, options = {}) {
|
|
|
222
225
|
// second marqueur au meme endroit. On l'annule par sa taille et non
|
|
223
226
|
// par `symbol: 'none'` : ECharts accroche les etiquettes aux
|
|
224
227
|
// symboles, les supprimer supprime aussi les etiquettes.
|
|
225
|
-
|
|
228
|
+
// Le point est la cible de survol : trop petit, l'infobulle se derobe
|
|
229
|
+
// et les series courtes n'ont plus de reperes lisibles.
|
|
230
|
+
symbolSize: valueLabels ? 0 : 8,
|
|
226
231
|
label: valueLabels ? {
|
|
227
232
|
show: true,
|
|
228
233
|
position: "top",
|