0

我有一些 xml 数据

<data>
   <point id="agent1">
     <changes>
       <location>
          <x>1.45</x>
          <y>2.35</y>
       </location>
       <location>
          <x>5.45</x>
          <y>1.55</y>
       </location>
     </changes>
   </point>
   <point id="agent2">
     <changes>
       <location>
          <x>1.55</x>
          <y>3.65</y>
       </location>
       <location>
          <x>3.75</x>
          <y>2.55</y>
       </location>
     </changes>
   </point>
</data>

我想知道是否可以使用 xslt 和 xml 中的源数据在 html 中生成图表。有什么建议么?我想要一些轻量级逻辑来生成散点图,其中点元素(点的位置)有一些颜色,例如 agent2 位置应该有红色。点位置的颜色可以在运行时随机生成。图表应按比例缩放到点位置。

4

0 回答 0