@oliasoft-open-source/charts-library 2.16.0-beta-3 → 2.16.0-beta-4
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oliasoft-open-source/charts-library",
|
|
3
|
-
"version": "2.16.0-beta-
|
|
3
|
+
"version": "2.16.0-beta-4",
|
|
4
4
|
"description": "React Chart Library (based on Chart.js and react-chart-js-2)",
|
|
5
5
|
"homepage": "https://gitlab.com/oliasoft-open-source/charts-library",
|
|
6
6
|
"bugs": {
|
|
@@ -120,7 +120,8 @@ const getLegendDimensions = (chart) => {
|
|
|
120
120
|
* @returns {number[]} An array with the X and Y coordinates.
|
|
121
121
|
*/
|
|
122
122
|
const getPositionCoordinates = (position, chart, xOffset, yOffset) => {
|
|
123
|
-
const { chartArea } = chart;
|
|
123
|
+
const { chartArea, width } = chart;
|
|
124
|
+
const temporaryChartAreaRight = width - 8;
|
|
124
125
|
|
|
125
126
|
const { legendWidth, legendHeight } = getLegendDimensions(chart);
|
|
126
127
|
|
|
@@ -137,7 +138,7 @@ const getPositionCoordinates = (position, chart, xOffset, yOffset) => {
|
|
|
137
138
|
];
|
|
138
139
|
case TextLabelPosition.TOP_RIGHT:
|
|
139
140
|
return [
|
|
140
|
-
chartArea.right
|
|
141
|
+
temporaryChartAreaRight - xOffset, //replace within chartArea.right when resize bug will be fixed
|
|
141
142
|
chartArea.top + yOffset + legendHeight,
|
|
142
143
|
];
|
|
143
144
|
case TextLabelPosition.MIDDLE_LEFT:
|
|
@@ -152,7 +153,7 @@ const getPositionCoordinates = (position, chart, xOffset, yOffset) => {
|
|
|
152
153
|
];
|
|
153
154
|
case TextLabelPosition.MIDDLE_RIGHT:
|
|
154
155
|
return [
|
|
155
|
-
|
|
156
|
+
temporaryChartAreaRight - xOffset - legendWidth, //replace within chartArea.right when resize bug will be fixed
|
|
156
157
|
chartArea.top + chartArea.height / 2,
|
|
157
158
|
];
|
|
158
159
|
case TextLabelPosition.BOTTOM_LEFT:
|
|
@@ -168,7 +169,7 @@ const getPositionCoordinates = (position, chart, xOffset, yOffset) => {
|
|
|
168
169
|
case TextLabelPosition.BOTTOM_RIGHT:
|
|
169
170
|
default:
|
|
170
171
|
return [
|
|
171
|
-
|
|
172
|
+
temporaryChartAreaRight - xOffset - legendWidth, //replace within chartArea.right when resize bug will be fixed
|
|
172
173
|
chartArea.bottom - yOffset - legendHeight,
|
|
173
174
|
];
|
|
174
175
|
}
|