Jump to content
Software FX Community

AxisSegments and Line drawing styles


engunneer

Recommended Posts

I'm having an issue with Axis Segments breaking the visual style of the series data.

 

Here is the Chart XAML (I am trying to do most of this in XAML and not in C#)

<cfx:Chart Margin="579,348,-6,0" x:Name="MassChart" ItemsSource="{Binding ChartData, UpdateSourceTrigger=PropertyChanged}"                                    Gallery="Line" PointCount="30"                                   >                            <cfx:Chart.AxisX>                                <cfx:Axis Visibility="Visible" Step="1" Inverted="True">                                    <cfx:Axis.Title>                                        <cfx:Title Content="Datapoint #" />                                    </cfx:Axis.Title>                                </cfx:Axis>                            </cfx:Chart.AxisX>                            <cfx:Chart.AxisY>                                <cfx:Axis Separation="1">                                    <cfx:Axis.Segments>                                        <cfx:AxisSegment From="10" To="14" ></cfx:AxisSegment>                                        <cfx:AxisSegment From="14" To="22" ></cfx:AxisSegment>                                    </cfx:Axis.Segments>                                    <cfx:Axis.Labels>                                        <cfx:AxisLabelAttributes Decimals="1"/>                                    </cfx:Axis.Labels>                                    <cfx:Axis.Max>22</cfx:Axis.Max>                                    <cfx:Axis.Min>10</cfx:Axis.Min>                                    <cfx:Axis.Step>1</cfx:Axis.Step>                                    <cfx:Axis.MinorStep>0.25</cfx:Axis.MinorStep>                                    <cfx:Axis.Title>                                        <cfx:Title Content="Weight" />                                    </cfx:Axis.Title>                                    <cfx:Axis.Sections>                                        <cfx:AxisSection From="0" To="14" Background="Red">                                            <cfx:AxisSection.Grids>                                                <cfx:Grids ShowInFront="False">                                                    <cfx:Grids.Major>                                                        <cfx:GridLine Stroke="Transparent" />                                                    </cfx:Grids.Major>                                                </cfx:Grids>                                            </cfx:AxisSection.Grids>                                        </cfx:AxisSection>                                        <cfx:AxisSection From="10.8" To="12.8" Foreground="Green" Background="Yellow" />                                        <cfx:AxisSection From="11.3" To="12.3" Foreground="Green" Background="YellowGreen" />                                        <cfx:AxisSection From="11.75" To="11.85" Foreground="Green" Background="Green" />                                    </cfx:Axis.Sections>                                </cfx:Axis>                            </cfx:Chart.AxisY>                            <cfx:Chart.Titles>                                <cfx:Title>Weights</cfx:Title>                            </cfx:Chart.Titles>                            <cfx:Chart.LegendBox>                                <cfx:LegendBox Visibility="Hidden" Focusable="False" />                            </cfx:Chart.LegendBox>                            <cfx:Chart.PlotArea>                                <cfx:PlotAreaAttributes Background="Transparent" />                            </cfx:Chart.PlotArea>                            <cfx:Chart.AllSeries>                                <cfx:AllSeriesAttributes Fill="Black" Gallery="Line" StrokeThickness="2" >                                    <cfx:AllSeriesAttributes.Marker>                                        <cfx:MarkerAttributes Size="5"/>                                    </cfx:AllSeriesAttributes.Marker>                                </cfx:AllSeriesAttributes>                            </cfx:Chart.AllSeries>                        </cfx:Chart>

Attached is the resulting chart, and you can see that one of the series no longer shows the lines between the markers.

If I remove the Segments,

                                    <cfx:Axis.Segments>                                        <cfx:AxisSegment From="10" To="14" ></cfx:AxisSegment>                                        <cfx:AxisSegment From="14" To="22" ></cfx:AxisSegment>                                    </cfx:Axis.Segments>

My data series shows the lines between the markers. How can I get this to work without breaking the series itself?

post-37392-0-64557700-1416856299_thumb.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...