3

I have an incanter time-series chart, which I can't seem to generate with the correct series labels on. My data looks like this:

__________________________
| :Time | :Count | :Name |
| 12344 |    0   | "A"   |
| 12344 |    1   | "B"   |
| 12344 |    2   | "C"   |
| 12345 |    4   | "A"   |

I have tried setting the series label to a small set of strings, but only the first value is displayed on the chart for the first series. My (incorrect sample) code to plot the chart looks like this:

      (view (time-series-plot :Time :Count
               :x-label "Date"
               :y-label "Points"
               :title "My Cool Graph"
               :legend true
               :group-by :Name
               :series-label "A" "B" "C"
               :data data-to-graph
               :points true
               ))

Any pointers much appreciated.

jamiei
  • 2,006
  • 3
  • 20
  • 28

1 Answers1

0

Juse a guess but the line:

:series-label "A" "B" "C"

is getting converted into a map like:

{:series-label "A", "B" "C"}

which is still only passing a single item as :series-label.
perhaps you would like:

:series-label ["A" "B" "C"]

though I'm not sure if incanter takes multiple values for labels.

Arthur Ulfeldt
  • 90,827
  • 27
  • 201
  • 284
  • Have you tried this? I'm relatively certain I had tried this approach and it had looked like the result of (str ["A" "B" "C"]) being displayed as the label for the first series. – jamiei Nov 12 '13 at 10:29
  • Just checked again, passing a coll has exactly the same effect as the non-coll. – jamiei Nov 12 '13 at 19:31
  • I was primarily trying to point out the syntax error in the call to time-series-plot in the question which is causing :series-label to be passed one string "A" as it's value and the "B" "C" is treated as the next key -> value pair. – Arthur Ulfeldt Nov 25 '13 at 21:44
  • True, I can't seem to identify what I should be passing though :) – jamiei Nov 27 '13 at 08:38