React Vis:图例样式和位置

时间:2019-10-10 18:11:33

标签: react-vis

下面的代码给了我一张图片,但图例有点让人讨厌。

所以现在不允许我上传图片,但是图例卡在左下角...很小。

有没有办法控制图例位置和/或提高文本大小等?

<div style={{height: "90vh", width: "95vw"}}>
                    <FlexibleXYPlot
                        xType="time"
                        colorType="category"
                        // onMouseLeave={this._onMouseLeave}
                        // style={{bottom:'50', top:'50'}}
                        // margin={{left: 40, right: 10, top: 30, bottom: 85}}
                    >
                        <DiscreteColorLegend
                            // onItemClick={this.clickHandler}
                            orientation="horizontal"

                            // width={180}
                            items={series.map(series => {
                                // console.log(series.props.colour+"");
                                return {title: series.props.color+"", color: series.props.color}
                            })
                            }
                        />
                        <HorizontalGridLines/>
                        <XAxis top={0} title="Dates"/>
                        <YAxis title="Price"/>
                        {series}
                    </FlexibleXYPlot>
                </div>

0 个答案:

没有答案