-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Support String labels for xAxis in line charts. #61
Comments
You can format the ticks on domain or measure axis by implementing a custom tick formatter and a corresponding tick formatter spec, then setting it on the axis spec. Tick formatter interface:
Tick formatter spec interface:
Setting custom tick formatter spec on axis: You can set a non zero bound measure axis: |
@lorrainekan is there a formatter for the bar charts as well. My bar chart has about 20 domains and the labels overlap causing a weird visual. |
Is there an example to implement X-axis using string labels? |
@huang-weilong @manujbahl @lorrainekan good luck.
This page https://juejin.im/post/5c14891ef265da61616e956b maybe like my code. |
What is the num year and where does this value come from inside the _formaterYear method? |
You saved my day thanks for helping us 💯 |
Can I have custom text labels on the xAxis.
I am building a flutter app where the client has an option to render bar, line or pie chart with same set of data. Bar and Pie charts take strings as xAxis (domainFn) while line chart expects number and auto sorts. Is there a way to define custom labels.
Also, for line is there a way to specify range of the axis.
e.g. if my xAxis numbers are 50,51 and 52 the axis range is set to 0-53 with a huge blank space for the 0-49 range and the actual line squished in right 10% of the chart area.
The text was updated successfully, but these errors were encountered: