harmony 鸿蒙polyline

  • 2022-08-09
  • 浏览 (416)

polyline

说明: 该组件从API version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。

绘制折线。

权限列表

子组件

支持animateanimateMotionanimateTransform

属性

支持Svg组件通用属性和以下属性。

名称 类型 默认值 必填 描述
id string - 组件的唯一标识。
points string - 设置折线的多个坐标点
格式为[x1,y1 x2,y2 x3,y3]。
支持属性动画,如果属性动画里设置的动效变化值的坐标个数与原始points的格式不一样,则无效

示例

<!-- xxx.hml -->
<div class="container">
  <svg fill="white" stroke="blue" width="400" height="400">
    <polyline points="10,110 60,35 60,85 110,10" fill="red"></polyline>
    <polyline points="10,200 60,125 60,175 110,100" stroke-dasharray="10 5" stroke-dashoffset="3"></polyline>
  </svg>
</div>

zh-cn_image_0000001173164845

你可能感兴趣的鸿蒙文章

harmony 鸿蒙兼容JS的类Web开发范式(ArkUI.Full)

harmony 鸿蒙数据类型说明

harmony 鸿蒙button

harmony 鸿蒙chart

harmony 鸿蒙divider

harmony 鸿蒙image-animator

harmony 鸿蒙image

harmony 鸿蒙input

harmony 鸿蒙label

harmony 鸿蒙marquee

0  赞