Note that there are some explanatory texts on larger screens.

plurals
  1. POGet default series color in code behind for LineSeries2D for DevExpress ChartControl
    primarykey
    data
    text
    <p>I have some <code>LineSeries2D</code> elements inside a <code>XYDiagram2D.Series</code>. I want to get the <code>Brush</code> property in code behind. When I try the code below the series brush property is null. Only If I set the brush property in XAML apperantly I get the right result. But If I don't set this in XAML I would expect to get the <code>Brush</code> with which the Series is colored by default instead of null.</p> <pre><code>&lt;dxc:XYDiagram2D.Series&gt; &lt;dxc:LineSeries2D ArgumentScaleType="Numerical" x:Name="series" ArgumentDataMember="Time" ValueDataMember="Value" DataSource="{Binding Path=ListaChart}"&gt; &lt;/dxc:LineSeries2D&gt; &lt;dxc:LineSeries2D ArgumentScaleType="Numerical" x:Name="series1" ArgumentDataMember="Time" ValueDataMember="Value" DataSource="{Binding Path=ListaChart2}"&gt; &lt;/dxc:LineSeries2D&gt; &lt;/dxc:XYDiagram2D.Series&gt; </code></pre> <p>and in code behind:</p> <pre><code>chart.UpdateData(); chart.UpdateLayout(); foreach (var targetSeries in chart.Diagram.Series.OfType&lt;LineSeries2D&gt;()) { vm.SelectedChannelBrush = targetSeries.Brush; } if (PNUsLB.SelectedIndex == 0) { vm.SelectedChannelBrush = series.Brush; } else { vm.SelectedChannelBrush = series1.Brush; } </code></pre> <p>The name of the <code>ChartControl</code> is "chart". My problem is <code>series.Brush</code>, <code>series1.Brush</code> and <code>targetSeries.Brush</code> are null after the charts are drawn at runtime. So how do I get the default series color in code behind?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload