Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EyeSee chart Legend issues #944

Closed
seandenigris opened this issue Aug 3, 2015 · 3 comments
Closed

EyeSee chart Legend issues #944

seandenigris opened this issue Aug 3, 2015 · 3 comments

Comments

@seandenigris
Copy link
Contributor

Originally reported on Google Code with 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

Reported by cunningham.cb on 2013-06-04 17:58:48

@seandenigris
Copy link
Contributor Author

Interestingly, if instead of using #yAxisLabel:, I instead use #diagramTitle:, it moves
the left 'y axis label' down beneath the legend, and it is at least readable.  In fact,
it looks better as a label - but not as a diagram title.

Of course, this still does nothing for the verticle legend overwriting the rigth axis.

Reported by cunningham.cb on 2013-06-04 18:31:43

@seandenigris
Copy link
Contributor Author

Type-Defect Component-EyeSee

Reported by cunningham.cb on 2013-06-06 18:26:03

@seandenigris
Copy link
Contributor Author

If someone wants to improve EyeSee, it's a welcome effort, but we should focus on Graph-ET.
So, am I marking this issue as won't fix.

Reported by tudor@tudorgirba.com on 2013-11-11 05:23:09

  • Status changed: WontFix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant