You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
changed the title [-]how to set X axis value for example by default 0 5 10 serious I want set Monday,tuesday, Wednesday so on[/-][+]how to set X axis value for example by default 0 5 10 series , I want set Monday,tuesday, Wednesday so on[/+]on Sep 14, 2018
I've been trying to figure out something similar. I found this: #68, which says that the x-axis values can be strings. I tried it out like this (as an anonymous lambda inside of a map function for the array of values that I want to display):
letrawXValue=try! sample.value(of:self.xAxisAttribute)varxValue:Any= rawXValue
if !(self.xAxisAttribute is NumericAttribute){
xValue =try!self.xAxisAttribute.convertToDisplayableString(from: rawXValue)}return[xValue,self.getDouble(for:self.yAxisAttribute, from: sample)]
When the sample's attribute that I want to display is numeric, it shows the double value, otherwise, it converts the x-value to a string (I have tested it with dates).
Here's a screenshot of it running (It shows the array indices on the x-axis but you can just call .xAxisLabelsEnabled(false) on the AAChartModel object to make it not show them there):
Activity
[-]how to set X axis value for example by default 0 5 10 serious I want set Monday,tuesday, Wednesday so on[/-][+]how to set X axis value for example by default 0 5 10 series , I want set Monday,tuesday, Wednesday so on[/+]TimeDelta commentedon Sep 18, 2018
I've been trying to figure out something similar. I found this: #68, which says that the x-axis values can be strings. I tried it out like this (as an anonymous lambda inside of a map function for the array of values that I want to display):
When the sample's attribute that I want to display is numeric, it shows the double value, otherwise, it converts the x-value to a string (I have tested it with dates).
Here's a screenshot of it running (It shows the array indices on the x-axis but you can just call

.xAxisLabelsEnabled(false)
on theAAChartModel
object to make it not show them there):AAChartModel commentedon Sep 19, 2018
As I wrote in the README of AAChartKit-Swift
configure the property
categories
, you can change the X axis value to be stringThe finally style just like this picture as follow
