1

I have an asp:chart with one serie in it. The serie has a collection of 13 points. (1 to 13)

When the data is binded to the chart with the Visual Web Designer data binding tool, I want to see even the columns that won't receive any data. (x Columns where y = 0).

Right now I have this (ASCII representation of my chart) :

        4 |[]
        3 |[]      []
        2 |[]  []  [][]      
        1 |[][][][][][]
           ------------
           1 3 5 7 9 10

Chart with x coordinates where y > 0. What I want is this :

       4 |[]
       3 |[]              []
       2 |[]      []      [][]    
       1 |[]  []  []  []  [][]
          -----------------------------
          1 2 3 4 5 6 7 8 9 10 11 12 13

Any idea how I can accomplish this ?

phadaphunk
  • 12,785
  • 15
  • 73
  • 107

1 Answers1

0

Could you please share your code? With below markup I get on X axis 12 numbers from 0 to 11:

<asp:Chart ID="Chart1" runat="server">
                <Series>
                    <asp:Series Name="Series1" ChartType="Point">
                        <Points>
                            <asp:DataPoint XValue="1" YValues="2" />
                            <asp:DataPoint XValue="3" YValues="5" />
                            <asp:DataPoint XValue="5" YValues="3" />
                            <asp:DataPoint XValue="7" YValues="8" />
                            <asp:DataPoint XValue="9" YValues="1" />
                            <asp:DataPoint XValue="10" YValues="1" />
                        </Points>
                    </asp:Series>
                </Series>
                <ChartAreas>
                    <asp:ChartArea />
                </ChartAreas>
            </asp:Chart>
Grzegorz Smulko
  • 2,525
  • 1
  • 29
  • 42