new hand ask question:how to set background like this pic?
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>
Hi,
I hve a question in XamLine Chart. I am using Date in Label for X-Axis and set Autorange to false. I specified the Minimum,Maximum and Unit for the range and the chart shows correctly. What I need is I want to remove weekend Labels from the X-Axis. Is it possible and how I can do so? Please reply.
Thanks & Regards,
Mukesh
There is currently no way to selectively hide axis labels. If your labels are a part of the data source, then you would have to either set the weekend labels to an empty string, or create an adapter that filters out weekends from your data.