TBogdan
TBogdan

Reputation: 737

ASP.NET chart control issue, background not transparent

How can I make the white section for this chart transparent, enter image description here

Upvotes: 0

Views: 5527

Answers (3)

djack109
djack109

Reputation: 1377

Set the chart and chartarea BackColor = "Transparent"

<asp:Chart ID="Chart1" runat="server" BackColor="Transparent" >
    <Titles>
        <asp:Title Text="Bubble Chart"></asp:Title>
    </Titles>
    <ChartAreas>
        <asp:ChartArea Name="ChartArea1" BackColor="Transparent"></asp:ChartArea>
    </ChartAreas>
    <Legends>
        <asp:Legend LegendStyle="Table" Docking="Bottom" IsDockedInsideChartArea="false" Name="Legend1"></asp:Legend>
    </Legends>
</asp:Chart>

Upvotes: 1

Krunal Mevada
Krunal Mevada

Reputation: 1655

Try this on i hope it's work:

  <asp:Chart ID="Chart1" runat="server">

        <Series>
            <asp:Series Name="Series1" ChartType="Pie" XValueMember="relatedcity" 
                YValueMembers="state_id">
            </asp:Series>
        </Series>
        <ChartAreas>
            <asp:ChartArea Name="ChartArea1" BackColor="Transparent">
            </asp:ChartArea>
        </ChartAreas>
    </asp:Chart>

Use chart Area to make it Transparent Background.

Upvotes: 2

saj
saj

Reputation: 4796

This is what I got;

<asp:Chart>
   <BorderSkin BackColor="Transparent" PageColor="Transparent" />
</asp:Chart>

in your case this will be

<asp:Chart ID="Chart1" runat="server" style="z-index: 1; left: 100px; top: 50px; position: absolute; background-color: transparent " BackColor="Transparent" PageColor="Transparent" DataSourceID="SqlDataSource1" BackImageTransparentColor="Silver" BorderlineColor="Transparent" Width="410px">
   <BorderSkin BackColor="Transparent" PageColor="Transparent" />
</asp:Chart>

Upvotes: 2

Related Questions