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
225
how to set background like this? who can help me?
posted

 

new hand ask question:how to set background like this pic?

 

Parents
  • 26458
    Offline posted

    You can use a template to re-style the chart's grid. Here's an example:

    <ig:XamChart Name="chart">
        <ig:XamChart.Legend>
            <ig:Legend Visible="False"/>
        </ig:XamChart.Legend>
            <ig:XamChart.Axes>
            <ig:Axis AxisType="PrimaryX">
                <ig:Axis.MajorGridline>
                    <ig:Mark Visible="False"/>
                </ig:Axis.MajorGridline>
            </ig:Axis>
            <ig:Axis AxisType="PrimaryY" Unit="2"/>
        </ig:XamChart.Axes>
        <ig:XamChart.Series>
            <ig:Series ChartType="Line" Fill="Black">
                <ig:Series.Marker>
                    <ig:Marker Format=" "/>
                </ig:Series.Marker>
                <ig:Series.DataPoints>
                    <ig:DataPoint Value="1"/>
                    <ig:DataPoint Value="3"/>
                    <ig:DataPoint Value="6"/>
                    <ig:DataPoint Value="4"/>
                    <ig:DataPoint Value="7"/>
                    <ig:DataPoint Value="9"/>
                    <ig:DataPoint Value="3"/>
                </ig:Series.DataPoints>
            </ig:Series>
        </ig:XamChart.Series>
               
        <ig:XamChart.Scene>
            <ig:Scene>
                <ig:Scene.GridArea>
                    <ig:GridArea>
                        <ig:GridArea.Template>
                            <ControlTemplate TargetType="ig:GridArea">
                                <Grid>
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition/>
                                            <RowDefinition/>
                                            <RowDefinition/>
                                            <RowDefinition/>
                                            <RowDefinition/>
                                            <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <Border Background="Red" Grid.Row="0"/>
                                        <Border Background="Yellow" Grid.Row="1"/>
                                        <Border Background="Lime" Grid.Row="2"/>
                                        <Border Background="Lime" Grid.Row="3"/>
                                        <Border Background="Yellow" Grid.Row="4"/>
                                        <Border Background="Red" Grid.Row="5"/>
                                    </Grid>
                                    <ContentPresenter/>
                                </Grid>
                            </ControlTemplate>
                        </ig:GridArea.Template>
                    </ig:GridArea>
                </ig:Scene.GridArea>
            </ig:Scene>
        </ig:XamChart.Scene>
    </ig:XamChart>

Reply Children
No Data