Skip to content

Charts only support text values for X axis #101

Description

@tf13

I've run into this attempting to use dates or numbers for the X axis. I can work around it by computing a new column that turns a number or date value into a string ... but should that be necessary?

The error message:

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/Users/xxx/anaconda/lib/python3.5/site-packages/agate/table/bar_chart.py", line 41, in bar_chart
    chart.add_bars(self, x=value, y=label)
  File "/Users/xxx/anaconda/lib/python3.5/site-packages/leather/chart.py", line 148, in add_bars
    Bars(fill_color)
  File "/Users/xxx/anaconda/lib/python3.5/site-packages/leather/chart.py", line 130, in add_series
    shape.validate_series(series)
  File "/Users/xxx/anaconda/lib/python3.5/site-packages/leather/shapes/bars.py", line 36, in validate_series
    raise ValueError('Bars only support Text values for the X axis.')
ValueError: Bars only support Text values for the X axis.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions