Skip to content

Support for specifying legend/axis font size via theme() #64

@Faye-yufan

Description

@Faye-yufan

Currently Animint theme() does not support arguments like text, axis.text nor legend.text to change axis/legend text size like below:

+ theme(...,
        axis.text = element_text(size=X),
        legend.text = element_text(size=X),
        ...)

I think this feature would require add new functions in extract theme settings, add_plot func, d3 axis text setting and add_legend func in animint.js. And the axis and lengend font size maybe default to 11px and 12px seperately if user not defined.

It may require add conditions to extract axis.text params or another variable name for assigning axis text size, maybe like axis.font. For legend text size, I think simply add .style("font-size","XXpt") would work.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions