## CSDN博客

### VML折线图(二)

<!—注： 这里的 @0, 1,2,3,4 分别为<v:formulas> 的第1,2,3,4,5个元素的计算结果-->

</v:shapetype>

<!-- 定义坐标刻度 y轴-->

<v:path textboxrect="@4,@5,@6,@7"></v:path>

<v:formulas>

<v:f eqn="sum width 0 0 "></v:f>

<v:f eqn="sum 0 #0 1 "></v:f>

<v:f eqn="prod 1 height #1 "></v:f>

<v:f eqn="prod @1 @2 1 "></v:f>

<v:f eqn="sum 0 0 100 "></v:f>

<v:f eqn="sum 0 @3 8 "></v:f>

<v:f eqn="sum 0 0 10 "></v:f>

<v:f eqn="sum @3 30 0 "></v:f>

</v:formulas>

</v:shapetype>

<!--定义坐标刻度 y轴-->

<v:path textboxrect="@4,@5,@6,@7"></v:path>

<v:formulas>

<v:f eqn="sum width 0 0 "></v:f>

<v:f eqn="sum 0 #0 1 "></v:f>

<v:f eqn="prod 1 height #1 "></v:f>

<v:f eqn="prod @1 @2 1 "></v:f>

<v:f eqn="sum @0 10 0 "></v:f>

<v:f eqn="sum 0 @3 8 "></v:f>

<v:f eqn="sum @0 100 0 "></v:f>

<v:f eqn="sum @3 30 0 "></v:f>

</v:formulas>

</v:shapetype>

<v:shapetype id=graphLine coordsize="400,400" strokecolor="#aaa" strokeweight=".8pt" path=" m@8@9 l@7@1 e" adj="0,0,400,400">

<v:stroke endarrow="oval" endarrowwidth="narrow" endarrowlength="short"></v:stroke>

<v:formulas>

<v:f eqn="sum 0 height #2 "></v:f>

<v:f eqn="sum 0 height #3 "></v:f>

<v:f eqn="sum 0 #0 1 "></v:f>

<v:f eqn="prod 1 width #1 "></v:f>

<v:f eqn="prod @3 @2 1 "></v:f>

<v:f eqn="prod 1 @3 2 "></v:f>

<v:f eqn="sum 0 @4 @5 "></v:f>

<v:f eqn="sum @4 @5 0 "></v:f>

<v:f eqn="if @2 @6 @7 "></v:f>

<v:f eqn="if @2 @0 @1 "></v:f>

<v:f eqn="prod @2 @3 1 "></v:f>

<v:f eqn="prod #0 @3 1 "></v:f>

<v:f eqn="sum height 20 0 "></v:f>

<v:f eqn="sum height 80 0 "></v:f>

</v:formulas>

</v:shapetype>

<!-- 绘制x轴坐标 -->

<v:path textboxrect="@10,@12,@11,@13"></v:path>

<v:formulas>

<v:f eqn="sum 1 0 0 "></v:f>

<v:f eqn="sum 1 0 0 "></v:f>

<v:f eqn="sum 0 #0 1 "></v:f>

<v:f eqn="prod 1 width #1 "></v:f>

<v:f eqn="prod @3 @2 1 "></v:f>

<v:f eqn="prod 1 @3 2 "></v:f>

<v:f eqn="sum 0 @4 @5 "></v:f>

<v:f eqn="sum @4 @5 0 "></v:f>

<v:f eqn="if @2 @6 @7 "></v:f>

<v:f eqn="if @2 @0 @1 "></v:f>

<v:f eqn="prod @2 @3 1 "></v:f>

<v:f eqn="prod #0 @3 1 "></v:f>

<v:f eqn="sum height 20 0 "></v:f>

<v:f eqn="sum height 80 0 "></v:f>

</v:formulas>

</v:shapetype>

<!-- 绘制y轴刻度-->

<v:textbox class="oText">400</v:textbox>

</v:shape>

<v:textbox class="oText">320</v:textbox>

</v:shape>

<v:textbox class="oText">240</v:textbox>

</v:shape>

<v:textbox class="oText">160</v:textbox></v:shape>

<v:textbox class="oText">80</v:textbox></v:shape>

<!-- X轴坐标刻度绘制 -->

<!-- 数据曲线绘制 -->

<!-- 图例-->

<v:shape class="yLine" strokecolor="#f11" strokeweight=".8pt" path=" m160,-35 l190,-35 e">

<v:stroke startarrow="oval" startarrowwidth="narrow" startarrowlength="short" endarrow="oval" endarrowwidth="narrow" endarrowlength="short"></v:stroke>

<v:path arrowok="t"></v:path></v:shape>

<v:shape class="Legend">

<v:path textboxrect="200,0,300,30"></v:path>

<v:textbox class="LegendText">产品A</v:textbox></v:shape>

<v:shape class="yLine" strokecolor="#6cf" strokeweight=".8pt" path=" m330,-35 l360,-35 e">

<v:stroke startarrow="oval" startarrowwidth="narrow" startarrowlength="short" endarrow="oval" endarrowwidth="narrow" endarrowlength="short"></v:stroke>

<v:path arrowok="t"></v:path></v:shape>

<v:shape class="Legend">

<v:path textboxrect="370,0,500,30"></v:path>

<v:textbox class="LegendText">产品B</v:textbox></v:shape>

</v:group>

</BODY>

</HTML>

0 0