Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
260
Making a series plot take up the entire chart area?
posted

 

I'd like to create a column chart where the plot area of the columns takes up 100% of the chart control area. That is, if the control is 100 wide by 50 tall, (and assuming there is one point in the series that is 1 on a scale of 1) that the one point would be 100 wide by 50 tall (if there were two points they would each be 50x50, etc)

  • 30692
    Suggested Answer
    Offline posted

    You can play with the axis ranges and the scene margins for interesting effects:

    <igChart:XamWebChart>
                <igChart:XamWebChart.Legend>
                    <igChart:Legend Width="0" />
                </igChart:XamWebChart.Legend>
                
                <igChart:XamWebChart.Axes>
                    <igChart:Axis AxisType="PrimaryX">
                        <igChart:Axis.Label>
                            <igChart:LabelGroup 
                                Visibility="Collapsed" />
                        </igChart:Axis.Label>
                    </igChart:Axis>
                    <igChart:Axis AxisType="PrimaryY" 
                                  Minimum="0" 
                                  Maximum="3" 
                                  Unit="1" 
                                  AutoRange="False">
                        <igChart:Axis.Label>
                            <igChart:LabelGroup 
                                Visibility="Collapsed" />
                        </igChart:Axis.Label>
                    </igChart:Axis>
                </igChart:XamWebChart.Axes>
    
                <igChart:XamWebChart.Scene>
                    <igChart:Scene Margin="-10,-10,-10,-15" />
                </igChart:XamWebChart.Scene>
    
                <igChart:XamWebChart.Series>
                    <igChart:Series ChartType="Column">
                        <igChart:Series.DataPoints>
                            <igChart:DataPoint Label="A" Value="1" />
                            <igChart:DataPoint Label="B" Value="2" />
                            <igChart:DataPoint Label="C" Value="3" />
                        </igChart:Series.DataPoints>
                    </igChart:Series>
                </igChart:XamWebChart.Series>
            </igChart:XamWebChart>
    


    Hope this helps!
    -Graham