24 September 2013

Sample Chart Applications

Sample Use of Pie Chart:

<asp:Chart ID="Chart2" runat="server" DataSourceID="accountRevenueSource" Style="margin-left: 50px"
                Width="310px" BackColor="229, 229, 229" Height="190px">
                <Series>
                    <asp:Series ChartType="Pie" Name="Account" XValueMember="AccountName" YValueMembers="TotalGrossRevenue"
                        CustomProperties="PieLabelStyle=Disabled" MapAreaAttributes="#VAL" ToolTip="#PERCENT{P}">
                        <EmptyPointStyle IsVisibleInLegend="False" IsValueShownAsLabel="false" />
                    </asp:Series>
                </Series>
              
                <ChartAreas>
                    <asp:ChartArea Name="ChartArea1" AlignmentOrientation="Horizontal" BackColor="#E5E5E5"
                        BorderColor="#E5E5E5" ShadowColor="White">
                        <Area3DStyle Rotation="10" Perspective="20" Enable3D="true" Inclination="40" IsRightAngleAxes="false"
                            WallWidth="0" IsClustered="false" />
                        <AxisY IsLogarithmic="true" />
                    </asp:ChartArea>
                </ChartAreas>
                <Legends>
                    <asp:Legend Name="Legend1" Title="Best Performing Accounts" IsDockedInsideChartArea="False"
                        IsTextAutoFit="true">
                    </asp:Legend>
                </Legends>
            </asp:Chart>



Sample Use of Bar Chart:

<asp:Chart ID="Chart1" runat="server" DataSourceID="viewOpportunitySource"
                Height="350px" style="margin-left: 0px" Width="400px" Palette="Fire"
                PaletteCustomColors="Gold" ImageType="Jpeg" BackColor="#E5E5E5"
                AlternateText="Please create an opportunity.">
                <Titles>
      <asp:Title Name="Title1"
         Alignment="TopCenter" Font="Tahoma, 10pt" ForeColor="102, 0, 102"
                        BackColor="229, 229, 229">
      </asp:Title>
   </Titles>
                <series>
                    <asp:Series Name="My Golden Opportunities" XValueMember="AccountName"
                        YValueMembers="ExpectedRevenue" ChartType="StackedColumn"
                        YValuesPerPoint="2" ToolTip="#VAL{D}" IsValueShownAsLabel="false"
                        LabelBackColor="White" LabelForeColor="RoyalBlue" ShadowOffset="2"
                        IsVisibleInLegend="False"  >
                    </asp:Series>
                </series>
               <chartareas>
            <asp:ChartArea Name="ChartArea1" AlignmentOrientation="Horizontal"
        BackColor="#E5E5E5" BackGradientStyle="HorizontalCenter" BorderColor="MediumOrchid"
                       BackImageTransparentColor="MediumPurple" ShadowColor="MediumPurple">
            <Area3DStyle
            rotation = "10"
            Perspective = "10"
            Enable3D = "true"
            Inclination = "15"
            IsRightAngleAxes = "false"
            WallWidth = "0"
            IsClustered = "false" />
            <AxisY IsLogarithmic = "false" />

            </asp:ChartArea>
        </chartareas>
        <Legends>
        <asp:Legend Name="Legend1" ShadowColor="Fuchsia" Enabled="False"></asp:Legend>
        </Legends>
                 <BorderSkin BackColor="MediumOrchid" />
    </asp:Chart>

No comments:

Post a Comment