usertest
usertest

Reputation: 27628

Setting the label color on Raphael chart

I cannot figure out how to set the label on the dot chart example. I'm sure its to do with the code below. I've tried setting legendcolor which works with the pie chart but doesn't look like it works on the dot chart. Any ideas? Thanks.

r.g.dotchart(20, 20, 850, 320, xs, ys, data, {symbol: "o", max: 14, heat:

true, axis: "0 0 1 1", axisxstep: 23, axisystep: 6, axisxlabels: axisx, axisxtype: " ", axisytype: " ", axisylabels: axisy, legendcolor:"white"}).hover(function () {

Upvotes: 4

Views: 1345

Answers (3)

jeffhuber
jeffhuber

Reputation: 139

I also had luck defining this in the CSS

text {
  fill:#fff;
}

Upvotes: 1

usertest
usertest

Reputation: 27628

Turns out it was as simple as this after calling dotchart -

            r.g.txtattr.fill = "white";

Upvotes: 3

jberg
jberg

Reputation: 4818

It does not look like it takes a color parameter that is used. On line 64 of g.dot.js it seems to be referencing colors. These colors are created on lines 35-43 of g.rapheal.js. It shouldn't be too hard to grab the source and change the colors as you please :D

Upvotes: 0

Related Questions