Skip to content

Commit

Permalink
Display bars in correct order. Closes #50.
Browse files Browse the repository at this point in the history
  • Loading branch information
onyxfish committed May 20, 2016
1 parent d7f5135 commit d0325a3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/multiple_series.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import leather

data1 = [
data1 = [
(0, 3),
(4, 5),
(7, 9),
Expand Down
1 change: 0 additions & 1 deletion leather/scales/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def infer(cls, series_list, dimension, data_type):
from leather.scales.ordinal import Ordinal
from leather.scales.temporal import Temporal

# Default Time scale is Temporal
# Default Time scale is Temporal
if data_type is Date:
data_min = date.max
Expand Down
5 changes: 5 additions & 0 deletions leather/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import six

from leather.data_types import DataType
from leather.shapes import Bars
from leather.utils import DIMENSIONS, X, Y


Expand Down Expand Up @@ -46,6 +47,10 @@ def __init__(self, data, shape, x=None, y=None, name=None):
self._shape = shape
self._name = name

# Bars should display top-down
if isinstance(self._shape, Bars):
self._data = tuple(reversed(self._data))

self._keys = [
self._make_key(x if x is not None else X),
self._make_key(y if y is not None else Y)
Expand Down

0 comments on commit d0325a3

Please sign in to comment.