Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 944 by cunningh...(a)gmail.com: EyeSee chart Legend issues
http://code.google.com/p/moose-technology/issues/detail?id=944
When creating a chart, I would like to include a legend, and EyeSee allows
for this. However, the legend is always top left of chart (even with
#legendBelow sent) and obscures the Y axis label; or it is to right (when
#verticalLegend is sent) and writes over the right axis if that axis is
used.
Example code for first issue:
i := 0.
series1 := OrderedCollection new: 7.
20130601 to: 20130607 do: [ :dt| series1 add: { dt. i := i + 1. }].
series2 := OrderedCollection new: 7.
i := i + 1.
20130601 to: 20130607 do: [ :dt| series2 add: {dt. i := i -1. }].
series3 := OrderedCollection new: 7.
20130601 to: 20130607 do: [ :dt| series3 add: {dt. 4. }].
colors := { Color red. Color blue. Color green. }.
parts := OrderedCollection new: 3.
{ series1. series2. series3. } withIndexDo: [ :ls :ind |
parts addLast: (ESLineDiagram new
y: #second;
preferredAxisMaxY: 7;
lineWidth: 2;
models: ls;
defaultColor: (colors at: ind);
yourself).
ind = 1 ifTrue: [
parts last
identifier: #first;
rotatedLabels: true;
xAxisLabel: 'Dates';
regularAxis;
axisColor: Color black;
yAxisLabel: 'Some Measurement that will Collide with Legend'
].
].
chart := ESDiagramRenderer new.
composite := chart compositeDiagram.
parts do: [ :chartPart| composite add: chartPart ].
composite yPadding: 30; height: 600; width: 800.
parts first
displayLegend: true;
legendBelow;
colorDict: (Dictionary keys: #( 'Series1' 'Series2' 'Series3')
values:
colors).
chart open.
Example code for second (vertical) issue:
i := 0.
series1 := OrderedCollection new: 7.
20130601 to: 20130607 do: [ :dt| series1 add: { dt. i := i + 1. }].
series2 := OrderedCollection new: 7.
i := i + 1.
20130601 to: 20130607 do: [ :dt| series2 add: {dt. i := i -1. }].
series3 := OrderedCollection new: 7.
20130601 to: 20130607 do: [ :dt| series3 add: {dt. 4. }].
seriesRight := OrderedCollection new: 7.
20130601 to: 20130607 do: [ :dt| seriesRight add: {dt. 6. }].
colors := { Color red. Color blue. Color green. Color yellow. }.
parts := OrderedCollection new: 4.
{ series1. series2. series3. } withIndexDo: [ :ls :ind |
parts addLast: (ESLineDiagram new
y: #second;
preferredAxisMaxY: 7;
lineWidth: 2;
models: ls;
defaultColor: (colors at: ind);
yourself).
ind = 1 ifTrue: [
parts last
identifier: #first;
rotatedLabels: true;
xAxisLabel: 'Dates';
regularAxis;
axisColor: Color black;
yAxisLabel: 'Some Measurement that will Collide with Legend'
].
].
parts addLast: (ESLineDiagram new
rightYAxis
y: #second;
preferredAxisMaxY: 7;
lineWidth: 2;
models: seriesRight;
defaultColor: colors last;
regularAxis;
axisColor: Color black;
yAxisLabel: 'Another Measurement that will Collide with Legend'
yourself).
chart := ESDiagramRenderer new.
composite := chart compositeDiagram.
parts do: [ :chartPart| composite add: chartPart ].
composite yPadding: 30; height: 600; width: 800.
parts first
displayLegend: true;
verticalLegend;
colorDict: (Dictionary keys: #( 'Series1' 'Series2' 'Series3'
'Series4')
values: colors).
chart open.
This occurs in the current Moose dev (4.8 of recent origin), on Windows.
Type-Defect
Component-EyeSee
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings