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

Definition supports legend #389

Closed
tomwayson opened this issue Feb 21, 2018 · 2 comments
Closed

Definition supports legend #389

tomwayson opened this issue Feb 21, 2018 · 2 comments
Assignees

Comments

@tomwayson
Copy link
Member

tomwayson commented Feb 21, 2018

I suggest we base this mostly on the pro spec:

    "ChartLegend": {
        "type": "type: string; const-value: chartLegend",
        "visible": "type: boolean; description: true",
        "title": "type: string",
        "alignment": "type: string; domain: <left | right | top | bottom>",
        "valueFormat": "type: string"
    },

I say we start by supporting the ones that line up AmCharts legend properties:

Pro AmCharts Notes
visible enabled
title labelText AmCharts also has accessibleLabel, should we set that?
alignment position in addition to the above values, AmCharts supports absolute, but we won't deal w/ that here, consumers will have to use overrides if they need that

A future iteration can support Pro's valueFormat by supplying AmCharts with a valueFunction, but I think we should be considering text formatting more broadly at that time.

For #375 the barest minimum that we need to support is legend: { visible: true }, but if title and alignment are easy to add, I'm not opposed to including those in the initial PR.

@tomwayson
Copy link
Member Author

cc @phlorah @ajturner

@benstoltz
Copy link
Member

Right now we have

export interface ILegend {
  enable?: boolean
}

Should be painless to switch that over to be visible and the other two parameters.

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

No branches or pull requests

2 participants