Closed RomuloVHSYS closed 5 years ago
Are you sure about that? this is the chart that I draw it with you AAChartModel instance in AAInfographics demo. as you can see, the default color of title and axis is gray, now it become a little bit of gold just like you configured as "#f4ab0e"
Change the "#00000000"
to be "#000000"
(there just six zero) you will get the black background color for chart
I'm put eight zero to get a transparent background(plus two for alpha).
I'm sure, all these labels stay dark gray. Maybe that's occurring because i put the the chartView on a view with Gradient layer?
That's the result of my code:
Ooh, my mistaken, sorry
I've update the pod recently, and i forgot to update the AAJSFiles.Bundle that i import into my project. Replacing this to the updated file solved the problem.
Thanks for attention.
@AAChartModel is above "X" and "Y" axis lable color related issue solve in latest pod download ? I'm facing same issue in latest version.
i am not using pod. i manually copy the required folder in my project.
@Hardiktspaceo , with my experience using that library, that problem get solved a while ago.
But i think the cocoapod release has no update, by workaround try to use pod that way pod 'AAInfographics', :git => 'https://github.com/AAChartKit/AAChartKit-Swift.git', :branch => 'master'
checkouting the master branch to get the latest updates.
Ok i will try using above and update you for the same.
On Tue, May 7, 2019 at 6:27 PM RomuloVHSYS notifications@github.com wrote:
@Hardiktspaceo https://github.com/Hardiktspaceo , with my experience using that library, that problem get solved a while ago.
But i think the cocoapod release has no update, by workaround try to use pod that way pod 'AAInfographics', :git => ' https://github.com/AAChartKit/AAChartKit-Swift.git', :branch => 'master' checkouting the master branch to get the latest updates.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AAChartModel/AAChartKit-Swift/issues/92#issuecomment-490068243, or mute the thread https://github.com/notifications/unsubscribe-auth/AGATXY6KOQIP277JVULTTZ3PUF4EXANCNFSM4F6XARXQ .
I just found out that my project was this issue too.
I'v need to change branch and update my pods, when i update the labels become dark gray and the bottom line change and lost the small vertical separators.
I'm reopening the issue @AAChartModel
I think that's happening because of that commit 5770f0329f6676dd0033a71bc85d7904d706c41b Maybe one property have changed the name when migrate from version 5.0.5 to version 7.1.1 of Highcharts
I can't found the axisColor
that the library is using on AAOptionsConstructor.swift > configureAAoptions(aaChartModel:) > {line 104} aaOptions.setValue(aaChartModel.axisColor, forKey: "axisColor")
In the docs of Highcharts i'v found that now the axis label color is changed that way:
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
labels: {
style: {
color: 'red'
}
}
}
And the library is generating the axis like this:
xAxis : {
gridLineWidth : 0,
label : {
enabled : true
},
categories : [ "dez", "jan", "fev", "mar", "abr", "mai" ],
visible : true
}
So, the library doesn't change the axis label color because before the property axisColor
change that
@Hardiktspaceo and @AAChartModel
I found the solution but i don't have enough time to make a MR now, so here it is the solution:
Replace the configureAAOptionsAxisContentAndStyle(aaOptions:aaChartModel:)
with the following
private static func configureAAOptionsAxisContentAndStyle(aaOptions: NSMutableDictionary,
aaChartModel: AAChartModel) {
let chartType = aaChartModel.chartType
//x 轴和 Y 轴的相关配置,扇形图、金字塔图和漏斗图则不需要设置 X 轴和 Y 轴的相关内容
if ( chartType != AAChartType.pie
&& chartType != AAChartType.pyramid
&& chartType != AAChartType.funnel) {
let aaXAxis = NSMutableDictionary()
aaXAxis.setValue(["enabled":aaChartModel.xAxisLabelsEnabled!], forKey: "label")// X 轴是否显示文字
aaXAxis.setValue(aaChartModel.xAxisReversed, forKey: "reversed")//是否反转 X 轴
aaXAxis.setValue(aaChartModel.xAxisGridLineWidth, forKey: "gridLineWidth")// X 轴网格线宽度
aaXAxis.setValue(aaChartModel.categories, forKey: "categories")
aaXAxis.setValue(aaChartModel.xAxisVisible, forKey: "visible")
let aaXAxisLabels = NSMutableDictionary()
aaXAxisLabels.setValue(["color":aaChartModel.axisColor!], forKey: "style")
aaXAxis.setValue(aaXAxisLabels, forKey: "labels")
let aaYAxis = NSMutableDictionary()
aaYAxis.setValue(["enabled":aaChartModel.yAxisLabelsEnabled!] , forKey: "label")// Y 轴是否显示数字
aaYAxis.setValue(aaChartModel.yAxisReversed, forKey: "reversed")//是否反转 Y 轴
aaYAxis.setValue(aaChartModel.yAxisGridLineWidth, forKey: "gridLineWidth") // Y 轴网格线宽度
aaYAxis.setValue(["text":aaChartModel.yAxisTitle], forKey: "title")//Y 轴标题
aaYAxis.setValue(aaChartModel.yAxisLineWidth, forKey: "lineWidth")
aaYAxis.setValue(aaChartModel.yAxisVisible, forKey: "visible")
let aaYAxisLabels = NSMutableDictionary()
aaYAxisLabels.setValue(["color":aaChartModel.axisColor!], forKey: "style")
aaYAxis.setValue(aaXAxisLabels, forKey: "labels")
aaOptions.setValue(aaXAxis, forKey: "xAxis")
aaOptions.setValue(aaYAxis, forKey: "yAxis")
}
}
But i can't figure why the small vertical separators on the X axis have done, can you help me?
@RomuloVHSYS Thanks for your help,It's fixed now🙂
@RomuloVHSYS and @AAChartModel Thank you so much for a quick reply and solution.
I need to download new version for above fix ? or just replace function in existing file ?
I need to download new version for above fix ? or just replace function in existing file ?
@Hardiktspaceo accordingly to the bc79f5b4c74f564e5c228e46dd7bbea52d82bea5 quoted by AAChartModel, the bug got fixed on the library, just update solve the problem
Changing these properties don't change anything on the chart. Title, subtitle and axisColor continues with the default color.
Here is my code: