Skip to content

Commit

Permalink
Labels do not need to be in the form "labels" : {"labels" : ....} for…
Browse files Browse the repository at this point in the history
… anything other than XAxis .. that I can tell
  • Loading branch information
PullMonkey committed Jul 31, 2008
1 parent 4949747 commit 71f6398
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
11 changes: 0 additions & 11 deletions lib/open_flash_chart.rb
Expand Up @@ -58,17 +58,6 @@ def set_colours(colour, grid_colour)
@grid_colour = grid_colour
end

# for some reason the json that needs to be produced is like this:
# "x_axis": { "offset": false, "labels": { "labels": [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ] } }
# note the "labels":{"labels": ....}
def set_labels(labels)
@labels = {:labels => labels}
end

def labels=(labels)
@labels = {:labels => labels}
end

def set_tooltip(tip)
if tip.is_a?(Tooltip)
#we have a style for our chart's tooltips
Expand Down
10 changes: 10 additions & 0 deletions lib/x_axis.rb
Expand Up @@ -2,4 +2,14 @@ class XAxis < OpenFlashChart
def set_3d(v)
@threed = v
end

# for some reason the json that needs to be produced is like this:
# "x_axis": { "offset": false, "labels": { "labels": [ "Jan", "Feb", "Mar", "- # note the "labels":{"labels": ....}
def set_labels(labels)
@labels = {:labels => labels}
end

def labels=(labels)
@labels = {:labels => labels}
end
end

0 comments on commit 71f6398

Please sign in to comment.