0
<series>  
           <asp:Series Name="Students" BorderColor="180, 26, 59, 105">  
            <Points>
                <asp:DataPoint AxisLabel="jon" XValue="5" YValues="4" />
                <asp:DataPoint AxisLabel="kon" XValue="15" YValues="44" />
                <asp:DataPoint AxisLabel="pol" XValue="85" YValues="90" />
            </Points>
           </asp:Series>  
           <asp:Series   Name="Teachers" BorderColor="180, 26, 59, 105">  
            <Points>
                <asp:DataPoint AxisLabel="hjim" XValue="50" YValues="40" />
                <asp:DataPoint AxisLabel="azdai" XValue="75" YValues="4" />
                <asp:DataPoint AxisLabel="kriasm" XValue="35" YValues="29" />
            </Points>
           </asp:Series>             
      </series> 

I want to change DataPoint's YValues in .cs file How can I do?

For example Series["Students"] --> DataPoint AxisLabel="jon" YValues="4" I want to change this value in .cs file

2
Contributors
1
Reply
13
Views
4 Years
Discussion Span
Last Post by LastMitch
0

I want to change DataPoint's YValues in .cs file How can I do?

Where is you datapoint code:

DataPoint dp = new DataPoint();

You need to make the adjustment in the XML file.

myXmlData = myXmlData.Replace("<DataPoint", "<asp:DataPoint");

<asp:Chart runat="server" Width="800" Height="800">

<asp:Series Name="Students" YValuesPerPoint="2" ChartType="" ChartArea="" Color="" BorderWidth="2" MarkerStyle="" MarkerBorderColor="">
<Points>
<asp:DataPoint AxisLabel="jon" XValue="5" YValues="4" />
<asp:DataPoint AxisLabel="kon" XValue="15" YValues="44" />
<asp:DataPoint AxisLabel="pol" XValue="85" YValues="90" />
</Points>
</asp:Series>

<asp:Series Name="Teachers" YValuesPerPoint="2" ChartType="" ChartArea="" Color="" BorderWidth="2" MarkerStyle="" MarkerBorderColor="">
<Points>
<asp:DataPoint AxisLabel="hjim" XValue="50" YValues="40" />
<asp:DataPoint AxisLabel="azdai" XValue="75" YValues="4" />
<asp:DataPoint AxisLabel="kriasm" XValue="35" YValues="29" />
</Points>
</asp:Series>

Edited by LastMitch: grammer

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.