简体   繁体   English

dygraphs图例中的形状

[英]Shapes in dygraphs legend

Is it possible to add shapes in a dygraphs legend?是否可以在 dygraphs 图例中添加形状? Right now I'm working on making a graph with series that are related to each other, at the moment I'm able to represent each of the values in the graph with a color and a shape, this means each series has a color and a shape, so the series that share the same color or shape share something in common.现在我正在制作一个包含彼此相关的系列的图表,目前我能够用颜色和形状表示图表中的每个值,这意味着每个系列都有一个颜色和一个形状,因此具有相同颜色或形状的系列具有共同点。 The problem is that I'm only able to represent the color of the series in the legend when the series are defined by their specific shape and color.问题是,当系列由其特定形状和颜色定义时,我只能表示图例中系列的颜色。 Unfortunately I haven't found any option in the legend section that helps me display the specific shape for each of the series.不幸的是,我在图例部分没有找到任何选项可以帮助我显示每个系列的特定形状。

If you're willing to build dygraphs from HEAD, you can use the new legendFormatter option.如果您愿意从 HEAD 构建 dygraphs,您可以使用新的legendFormatter选项。 This gives you complete control over the legend.这使您可以完全控制图例。 Check out the PR description for details.查看 PR 描述以了解详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM