Open keithgulbro opened 3 years ago
hey, If i am correct i had the same problem and fixed it by changing the function at file node_modules/nativescript-ui-chart/initializers/chart-initializers.ios.js at line 391
ChartSeriesValueMapper.prototype.applyLabelFontFromStyle = function (series) {
if (series.ios && series.label && series.label.style.fontInternal !== font_1.Font.default) {
var defaultLabelSize = 10;
var labelFontSize = series.label.style.fontInternal ? series.label.style.fontInternal.fontSize : defaultLabelSize;
var uiFont = UIFont.systemFontOfSize(labelFontSize);
var iosFont = series.label.style.fontInternal ? series.label.style.fontInternal.getUIFont(uiFont) : uiFont;
series.ios.style.pointLabelStyle.font = iosFont;
if (series.owner) {
series.updateOwnerChart();
}
}
};`
I stumbled upon this same error and fixed in a different way.
I added a generic CSS style to my chart labels (this can be overriden accordingly):
ChartSeriesLabel {
margin: 10;
font-weight: bold;
font-size: 1;
color: white;
}
and also specified the label style for the specific series where the error is happening
<PointLabelStyle tkLineLabelStyle margin="10"
fontStyle="Normal"
fillColor="#000000"
textSize="1"
textColor="White">
</PointLabelStyle>
I had to add both pieces of code to get rid of the error.
Please, provide the details below:
Hi there,
I have a Nativescript project leveraging the
nativescript-ui-chart
plugin however, while on Nativescript6.5.2
for iOS I am getting the following error even when implementing the demo code.I am using the sample data provided inside the demo as well.
Here's my
package.json
file: