You can sort the values on a chart by either the values on the X-axis or the Y-axis. The sort options available in the sort drop down list depend on the data type of the attribute. You can sort string attributes alphabetically and numeric attributes by a variety of functions such as sum, average, median, etc.
For example, string attributes have the following:

And number attributes have the following:

To sort the values on the chart: