简体   繁体   English

总是反应原生的胜利图显示工具提示

[英]react native victorychart show tooltip always

I have a victory chart working fine but need the tooltip to show always not only on touch...我的胜利图表运行良好,但需要工具提示不仅始终显示在触摸...

<VictoryChart
  height={200}
  animate={{ duration: 500 }}
  // domain={{  y: [400000, 498542.15] }}
  containerComponent={
    <VictoryVoronoiContainer
      labels={() => "placeHolder"}
      labelComponent={
        <VictoryTooltip
          style={{ fontSize: "15px", fill: BRAND_COLORS.white }}
          cornerRadius={15}
          pointerLength={10}
          active={true}
          flyoutStyle={{
            stroke: BRAND_COLORS.transparent,
            fill: "red",
          }}
          text={"$345,000.34"}
        />
      }
    />
  }
/>

In VictoryChart component add the prop在 VictoryChart 组件中添加道具

events={[{
            target: 'parent',
            eventHandlers: {
              onTouchEnd: () => {},
            },
          },
        ]}

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

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