CarlicosMar / dwpe

Automatically exported from code.google.com/p/dwpe
0 stars 0 forks source link

Color codes mixed on Area type chart (chart lines color vs. labels color) #17

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Make a chart with one or lines with Area type chart 

What is the expected output? What do you see instead?
The lines on the chart have to be the same like the color codes under the
x-axis - where I can see the labels for the lines.

The colors mixed in reverse order. The color code for the first label got
the last table row values on the chart.

What version of the product are you using? On what operating system?
Mozilla/5.0 (Windows; U; Windows NT 6.1; hu; rv:1.9.2.3) Gecko/20100401
Firefox/3.6.3

*** Please use labels below to identify the type of issue and the widget to
which it applies. ***

Chart lines color, label colors problem

Original issue reported on code.google.com by tamas....@eldanor.hu on 16 Apr 2010 at 3:45

GoogleCodeExporter commented 8 years ago
OK. I solved it myself.

Find this row: ctx.strokeStyle = this.color;

And insert this few lines there.

/**
* Solve the color key-line color mix problem
*/
if (h>0) goodLineColor=dataGroups[h-1].color;
else goodLineColor=dataGroups[h].color;

ctx.strokeStyle = goodLineColor;

And then change this line:
ctx.fillStyle = this.color;
to this one:
ctx.fillStyle = goodLineColor;

Original comment by tamas....@eldanor.hu on 18 Apr 2010 at 2:43

GoogleCodeExporter commented 8 years ago

Original comment by scottj...@gmail.com on 23 Apr 2010 at 8:26