@hestia-earth/ui-components-charts 0.43.24 → 0.43.26
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.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -702,8 +702,8 @@ declare const breakdownBars: (values: IContributionLog[], category?: string) =>
|
|
|
702
702
|
declare const breakdownBarText: (displayValue: boolean, total: number, maximumValues: number) => AfterBarDrawSettings;
|
|
703
703
|
/** The tooltip of one bar: its value and share, or every contributor the "others" bar groups. */
|
|
704
704
|
declare const breakdownTooltip: (item: BarChartDataItem | undefined, includedItems: BarChartDataItem[] | undefined, logs: IContributionLog[], total: number, maximumValues: number) => string;
|
|
705
|
-
/** The x axis: from the most negative
|
|
706
|
-
declare const breakdownScale: (values: IContributionLog[]) => {
|
|
705
|
+
/** The x axis: from the most negative bar, or zero, to the largest, with some room on each side. */
|
|
706
|
+
declare const breakdownScale: (values: IContributionLog[], category?: string) => {
|
|
707
707
|
options: {
|
|
708
708
|
scales: {
|
|
709
709
|
x: {
|
package/dist/index.d.ts
CHANGED
|
@@ -702,8 +702,8 @@ declare const breakdownBars: (values: IContributionLog[], category?: string) =>
|
|
|
702
702
|
declare const breakdownBarText: (displayValue: boolean, total: number, maximumValues: number) => AfterBarDrawSettings;
|
|
703
703
|
/** The tooltip of one bar: its value and share, or every contributor the "others" bar groups. */
|
|
704
704
|
declare const breakdownTooltip: (item: BarChartDataItem | undefined, includedItems: BarChartDataItem[] | undefined, logs: IContributionLog[], total: number, maximumValues: number) => string;
|
|
705
|
-
/** The x axis: from the most negative
|
|
706
|
-
declare const breakdownScale: (values: IContributionLog[]) => {
|
|
705
|
+
/** The x axis: from the most negative bar, or zero, to the largest, with some room on each side. */
|
|
706
|
+
declare const breakdownScale: (values: IContributionLog[], category?: string) => {
|
|
707
707
|
options: {
|
|
708
708
|
scales: {
|
|
709
709
|
x: {
|
package/dist/index.js
CHANGED
|
@@ -2137,8 +2137,8 @@ var breakdownBars = (values, category) => {
|
|
|
2137
2137
|
};
|
|
2138
2138
|
var breakdownBarText = (displayValue, total, maximumValues) => displayValue ? { textFn: ({ label, data: data2 }, index) => index === maximumValues ? `${label} at ${data2}` : `${data2}` } : { textFn: ({ data: data2 }) => `${valueRatio(data2, total)}%` };
|
|
2139
2139
|
var breakdownTooltip = (item, includedItems, logs, total, maximumValues) => !utils.isUndefined(item == null ? void 0 : item.count) ? (includedItems == null ? void 0 : includedItems.length) ? chartBreakdownLabel(logs, total, maximumValues) : `${item.label}: ${chartLabel(item.count, total)}` : "";
|
|
2140
|
-
var breakdownScale = (values) => {
|
|
2141
|
-
const numbers = values.map((
|
|
2140
|
+
var breakdownScale = (values, category) => {
|
|
2141
|
+
const numbers = breakdownBars(values, category).map(({ count }) => count);
|
|
2142
2142
|
return {
|
|
2143
2143
|
options: {
|
|
2144
2144
|
scales: {
|
package/dist/index.mjs
CHANGED
|
@@ -2126,8 +2126,8 @@ var breakdownBars = (values, category) => {
|
|
|
2126
2126
|
};
|
|
2127
2127
|
var breakdownBarText = (displayValue, total, maximumValues) => displayValue ? { textFn: ({ label, data: data2 }, index) => index === maximumValues ? `${label} at ${data2}` : `${data2}` } : { textFn: ({ data: data2 }) => `${valueRatio(data2, total)}%` };
|
|
2128
2128
|
var breakdownTooltip = (item, includedItems, logs, total, maximumValues) => !isUndefined(item == null ? void 0 : item.count) ? (includedItems == null ? void 0 : includedItems.length) ? chartBreakdownLabel(logs, total, maximumValues) : `${item.label}: ${chartLabel(item.count, total)}` : "";
|
|
2129
|
-
var breakdownScale = (values) => {
|
|
2130
|
-
const numbers = values.map((
|
|
2129
|
+
var breakdownScale = (values, category) => {
|
|
2130
|
+
const numbers = breakdownBars(values, category).map(({ count }) => count);
|
|
2131
2131
|
return {
|
|
2132
2132
|
options: {
|
|
2133
2133
|
scales: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hestia-earth/ui-components-charts",
|
|
3
|
-
"version": "0.43.
|
|
3
|
+
"version": "0.43.26",
|
|
4
4
|
"description": "The charts of the HESTIA platform without Angular or a stylesheet: their data, Chart.js configuration, plugins, d3 hierarchy and exports",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|