Question

I'm working with C# .NET 3.5, Dundas Charts 7.2. Here is the chart I have in the .aspx file.

<DCWC:Chart ID="Chart2" Height="140px" Width="245px" runat="server" DataSourceID="ObjectDataSource1"
    Palette="Pastel">
    <Legends>
        <DCWC:Legend Name="Default" Enabled="False">
        </DCWC:Legend>
    </Legends>
    <BorderSkin PageColor="AliceBlue" />
    <Titles>
        <DCWC:Title Name="Title1">
        </DCWC:Title>
    </Titles>
    <Series>
        <DCWC:Series CustomAttributes="BarLabelStyle=Outside" BorderColor="64, 64, 64" Color="#3782EE" ChartType="Bar" Name="Series1"
            ShadowOffset="1" ShowLabelAsValue="True" ValueMemberX="Title" ValueMembersY="Score">
        </DCWC:Series>
    </Series>
    <ChartAreas>
        <DCWC:ChartArea Name="Default">
            <AxisY>

                <LabelStyle IntervalOffset="20" Interval="20" Format="P0" />
                <MajorTickMark Style="none" />
            </AxisY>
            <AxisX>
                <MajorGrid Enabled="False" />
                <MajorTickMark Style="none" />
            </AxisX>
        </DCWC:ChartArea>
    </ChartAreas>

</DCWC:Chart>

The Y axis is set to show values as a percent, since the highest number data in the chart is 42% it only displays up to 60% (as I have interval set to 20) on the Y axis of the chart. What I'm looking for is a way to force the chart to show the Y axis up to 100% even though that will leave almost 60% of blank space. Either in aspx chart parameters or the codebehind.

Was it helpful?

Solution

For me this simple line in chart code setup worked :

Chart2.ChartAreas("Default").AxisY.Maximum = 100
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top