响应式日历未显示图例

时间:2018-10-29 14:37:46

标签: reactjs responsive

我具有以下依赖性:“ @ nivo / calendar”:“ 0.49.0”

以及以下代码:

                  <ResponsiveCalendar
                      data={st.timeSpentDaily}
                      from="2018-01-01"
                      to="2018-10-31"
                      emptyColor="#eee"
                      colors={[
                          "#BBDEFB",
                          "#90CAF9",

                      ]}
                      height={setChartSize(props.width)}
                      margin={{
                          top: 24,
                          right: 0,
                          bottom: 0,
                          left: 20
                      }}
                      yearSpacing={40}
                      monthBorderColor="#ffffff"
                      monthLegendOffset={10}
                      dayBorderWidth={2}
                      legends={[
                          {
                              "anchor": "bottom-right",
                              "direction": "row",
                              "translateY": 36,
                              "itemCount": 2,
                              "itemWidth": 34,
                              "itemHeight": 36,
                              "itemDirection": "top-to-bottom"
                          }
                      ]}

                    />

日历正确显示,但是没有图例吗?为什么?

0 个答案:

没有答案