`
nintenyun
  • 浏览: 26103 次
  • 性别: Icon_minigender_1
  • 来自: 上海
最近访客 更多访客>>
社区版块
存档分类
最新评论

MsChart 柱状图前台代码整理

阅读更多

<asp:Chart ID="ctUtilizationBySM" runat="server" BackImageAlignment="TopRight"
                               PaletteCustomColors="IndianRed; DarkSeaGreen; 0, 192, 192; 128, 128, 255; CornflowerBlue; Gold"
                                Width="700px" BackColor="PapayaWhip"    //the width of chart,the backcolor of chart
                                BackGradientStyle="TopBottom" BackImageTransparentColor="White" 
                                BorderlineColor="Black">
                                <Legends>
                                
                                    <asp:Legend BackColor="Transparent" Name="Legend2"  //legend means a tag,this tag is used notfiy column chart
                                        DockedToChartArea="ChartArea1" Alignment="Far" Docking="Top" 
                                        IsDockedInsideChartArea="False"  >
                                         <Position Height="8.026756" Width="15.4154158" X="83.5" Y="3" /> //legend's position
                                        
                                    </asp:Legend>
                                    <asp:Legend BackColor="Transparent" Name="Legend1" 
                                        DockedToChartArea="ChartArea1" Alignment="Far" Docking="Top" 
                                        IsDockedInsideChartArea="False">
                                     
                                        <Position Height="8.026756" Width="15.4154158" X="72.5" Y="3" />
                                     
                                    </asp:Legend>
                                </Legends>
                                <BorderSkin SkinStyle="Emboss" />  //add emboss effect,backgroud effect
                                <Series>// histogram  series                           
		<asp:Series Name="Series1" Color="49,130,239" Legend="Legend1" LegendText="Pre Utl%"
                                        IsValueShownAsLabel="True" Font="Microsoft Sans Serif, 6.5pt" 
                                        ChartArea="ChartArea1"
                                        CustomProperties="DrawingStyle=Cylinder"> //histogrtam's style
                                    </asp:Series>
                                    <asp:Series Name="Series2" Color="255,174,49" Legend="Legend2" LegendText="Utl%" 
                                        IsValueShownAsLabel="True" ChartArea="ChartArea1" 
                                        Font="Microsoft Sans Serif, 6.5pt"
                                        CustomProperties="DrawingStyle=Cylinder">
                                      
                                    </asp:Series>
                                </Series>
                                   
                                <ChartAreas> //inner chart
                                     <asp:ChartArea Name="ChartArea1" BackColor="OldLace"  //inner chart's color
                                        BorderColor="64, 64, 64, 64" ShadowColor="Transparent" 
                                        BackGradientStyle="TopBottom" BackSecondaryColor="White">
                                        <AxisY IsLabelAutoFit="True" LineColor="64, 64, 64, 64">
                                            <MajorGrid LineColor="64, 64, 64, 64" />
                                            <LabelStyle Font="Verdana, 10pt" />
                                            <ScaleBreakStyle LineColor="Transparent" />
                                        </AxisY>// axis y
                                        <AxisX IsLabelAutoFit="False" LabelAutoFitMaxFontSize="8" 
                                            LabelAutoFitMinFontSize="5" LineColor="64, 64, 64, 64">
                                            
                                            <MajorGrid LineColor="64, 64, 64, 64" />
                                            <LabelStyle Font="Verdana, 8pt"  Interval="1" 
                                                IntervalOffset="Auto" IntervalOffsetType="Auto" IntervalType="Number" 
                                                IsStaggered="True"/>
                                            <ScaleBreakStyle LineColor="Transparent" />
                                        </AxisX> // axis x
                                        <AxisX2 IsLabelAutoFit="False">
                                            <MajorGrid Enabled="False" />
                                            <MajorTickMark Enabled="False" /> // cursor
                                            <LabelStyle Font="Microsoft Sans Serif, 5pt" />
                                        </AxisX2>
                                        <Position Height="77.16558" Width="89.43796" X="4.82481766" Y="16.0208549" /> //chart position
                                        <InnerPlotPosition Height="86.9832" Width="90.5838" X="7.0000" Y="1.40178" /> //chart inner position
                                        <Area3DStyle LightStyle="Realistic" WallWidth="2" />
                                    </asp:ChartArea>
                                </ChartAreas>
                            </asp:Chart>  

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics