Telerik Forums
UI for WPF Forum
1 answer
188 views

Is it possible to remove RadDiagramShape-Connectos at runtime (I've created my own shape-class: BaseNodeShape : RadDiagramShape)?

If I'm calling Connectors.Clear(), the connectors are not removed from the shape, do I need to start/end editing or something like that?

I'm creating connectors like that, since the code is called multiple times, I also need to remove old connectors. But old connectors just stay in ths shape.


/// <summary>
        /// Creates connectors and calls LoadConnectorText method
        /// </summary>
        public virtual void CreateConnectors()
        {
            if (ViewModel?.DataPins == null || ViewModel?.FlowPins == null)
                return;

            int longestTextLength = 0;
            
            FlowConnectors?.Clear();
            DataConnectors?.Clear();
            Connectors?.Clear();
            
            // Fill connector list
            foreach (var pin in ViewModel.DataPins)
            {
                var dataConnector = new DataConnector(pin.Name, pin.DisplayName,
                    pin.PinDirection == PinDirectionDefinition.In ? ConnectorDirection.In : ConnectorDirection.Out,
                    pin.DataConnectorType, pin.IsGeneric, pin.AllowedTypes)
                {
                    DataContext = pin
                };
                
                DataConnectors.Add(dataConnector);

                if (dataConnector.Name.Length > longestTextLength)
                    longestTextLength = dataConnector.Name.Length;
            }

            foreach (var pin in ViewModel.FlowPins)
            {
                var flowConnector = new FlowConnector(pin.Name, pin.DisplayName,
                    pin.PinDirection == PinDirectionDefinition.In ? ConnectorDirection.In : ConnectorDirection.Out)
                {
                    DataContext = pin
                };

                FlowConnectors.Add(flowConnector);

                if (flowConnector.Name.Length > longestTextLength)
                    longestTextLength = flowConnector.Name.Length;
            }

            var headerWidth = 15 + (ViewModel.DisplayName.Length * 8);
            var totalLineWidth = longestTextLength * 10;

            if (headerWidth < totalLineWidth)
                ViewModel.Width = totalLineWidth;
            else
                ViewModel.Width = headerWidth;

            if (ViewModel.Width < 50)
                ViewModel.Width = 50;

            const double heightPerDataPin = 20;
            const double heightPerFlowPin = 20;
            const double baseHeight = 35;

            var flowInPinCount = FlowConnectors.Count(x => x.ConnectorDirection == ConnectorDirection.In);
            var dataInPinCount = DataConnectors.Count(x => x.ConnectorDirection == ConnectorDirection.In);
            var flowOutPinCount = FlowConnectors.Count(x => x.ConnectorDirection == ConnectorDirection.Out);
            var dataOutPinCount = DataConnectors.Count(x => x.ConnectorDirection == ConnectorDirection.Out);

            if ((flowInPinCount * heightPerFlowPin + dataInPinCount * heightPerDataPin) > (flowOutPinCount * heightPerFlowPin + dataOutPinCount * heightPerDataPin))
            {
                var flowPinsHeight = heightPerFlowPin * flowInPinCount;
                var dataPinsHeight = heightPerDataPin * dataInPinCount;
                ViewModel.Height = baseHeight + flowPinsHeight + dataPinsHeight + 5;
            }
            else
            {
                var flowPinsHeight = heightPerFlowPin * flowOutPinCount;
                var dataPinsHeight = heightPerDataPin * dataOutPinCount;
                ViewModel.Height = baseHeight + flowPinsHeight + dataPinsHeight + 5;
            }

            double heightOffset = (35 / ViewModel.Height);
            double rowMargin = (18 / ViewModel.Height);
            double xLeft = (8 / ViewModel.Width); // 0.04;
            double xRight = 1 - xLeft;
            double yTop = heightOffset;

            foreach (var flowConnector in FlowConnectors
                .Where(connector => connector.ConnectorDirection == ConnectorDirection.In))
            {
                flowConnector.Offset = new Point(xLeft, yTop);
                this.Connectors.Add(flowConnector);
                yTop += rowMargin;                
            }

            foreach (var dataConnector in DataConnectors
                .Where(connector => connector.ConnectorDirection == ConnectorDirection.In))
            {
                dataConnector.Offset = new Point(xLeft - 0.01, yTop);
                this.Connectors.Add(dataConnector);
                yTop += rowMargin;                
            }

            yTop = heightOffset;
            foreach (var flowConnector in FlowConnectors
                .Where(connector => connector.ConnectorDirection == ConnectorDirection.Out))
            {
                flowConnector.Offset = new Point(xRight, yTop);
                this.Connectors.Add(flowConnector);
                yTop += rowMargin;
            }

            foreach (var dataConnector in DataConnectors
                .Where(connector => connector.ConnectorDirection == ConnectorDirection.Out))
            {
                dataConnector.Offset = new Point(xRight, yTop);
                this.Connectors.Add(dataConnector);
                yTop += rowMargin;
            }
        }
Dinko | Tech Support Engineer
Telerik team
 answered on 22 Jun 2021
1 answer
907 views

Hope somebody can help out here.

We have recently started using the RadSyntaxEditor in an application that uses the Prism framework. There have been some posts about the SyntaxEditor not showing in the UI unless you put it in a ContentControl. We did this and bound the Content to the SyntaxEditor instance in the VM.

This worked fine and we can add a custom tagger but none of the event subscriptions to the Document.TextContentChanged event seem to work.

If we then template the SyntaxEditor in the XAML and bind to an instance of the TextDocument like this, how do you set up a custom tagger?

<ControlTemplate x:Key="SyntaxEditorControlTemplate" TargetType="{x:Type ContentControl}">
            <telerik:RadSyntaxEditor AutoScrollToCaretOnTextChange="True"
                                      CaretDisplayMode="Block"
                                      Document="{Binding SyntaxTextDocument}">

            </telerik:RadSyntaxEditor>
</ControlTemplate>

Can anybody point us to an example of using the SyntaxEditor with MVVM please.

Thanks

Vladimir Stoyanov
Telerik team
 answered on 21 Jun 2021
1 answer
402 views

Hi,

I am having a WPF window with few grids containing rows varying from 2-100.  When I click on a link from a previous window, this window has to be loaded. I have used RadBusyIndicator for the entire content. And the grid population  LoadData() is being done in Tasks which is called on Window Loading. So presently my UI is displayed with all the grid without any contents and maybe after 4-5 seconds, the contents are loaded. 

I want to display the RadbusyIndicator when no contents are present and once the contents appear, it should disappear. Please find the below code I have implemented.  But in this case, RadBusyIndicator is not displayed. Kindly help.

An alternative that works presently is to put DisplayAfter = 0, here the indicator appears though it doesn't spin and later vanish when data loads.

public void LoadData( string filePath)

        {
            this.IsBusy = true;

            Task.Factory.StartNew(() => {
                OnPopulateDataDoWork(filePath);
            }).ContinueWith(t =>
            {
                this.IsBusy = false;
            }, TaskScheduler.FromCurrentSynchronizationContext());


Thanks,

Divya

 

Vladimir Stoyanov
Telerik team
 answered on 21 Jun 2021
1 answer
324 views
I'm using the implicit Fluent theme.

If you look at my ResourceTemplate.xaml, there is a Fluent theme and a Transparent theme.
Telerik.Windows.Controls only applies the transparent theme.

Is there a way to change only BusyIndicator to Transparent theme?
I want the main window to be a fluent theme.
(I know that Style.Manager shouldn't be for implicit styles.)

If you click the button, BusyIndicator opens a new window and works. But there is a problem.
BusyContent is incremented by 1 only internally.
However BusyIndicator is not displayed, only blank.
What's wrong?

Please check my source for details.

Thank you.
Dinko | Tech Support Engineer
Telerik team
 answered on 21 Jun 2021
1 answer
214 views

In VS 2019 I got prompted to update to a new version R2 2021 SP1.  I accepted and got the download window, in the download window I clicked on "Release Notes" and my Chrome browser opened with page of notes.

I return to VS and the download shows 100% complete but both the "Cancel" and "Minimize" buttons are grayed out.  Waited about 10 minutes and still the same, so I had to "End Task" VS 2019.

Rob.

Nikolay Mishev
Telerik team
 answered on 18 Jun 2021
3 answers
220 views

Hello,

i have an issue using RadCartesianChart with mixed Series types. All series have the same ItemsSource. I know if there are too much Datapoints the chart filters some points. The problem is that not on all series the same datapoints are filtered.

In the first picture you can see that there is no Datapoint for the StepLineSeries at 16:34:29, the next closest point is at 16:34:16. It is filtered out because there are too much datapoints for this range. This would be ok if it is also filtered out at the RangeSeries.

In the second picture we are zoomed in and we see that the point is no more filtered.

In the third picture i used for all 3 series the same series type (unzoomed). Now all serieses are filtered correct the same Datapoints.

How can i change this behavior of the Chart that all series types do the filtering the same way? In my opinion this behavior is wrong. I would expect the bevavior of Picture three also for different series types.

<telerik:RadCartesianChart.Series>
          <telerik:StepLineSeries DisplayName="Value" Stroke="DodgerBlue" StrokeThickness="1" ItemsSource="{Binding Data}" CategoryBinding="Timestmp" ValueBinding="Value"></telerik:StepLineSeries>
          <telerik:RangeSeries DisplayName="MinValue" Stroke="#88FF0000" StrokeThickness="1" Fill="#44FF0000" ItemsSource="{Binding Data}" CategoryBinding="Timestmp" LowBinding="LowBinding" HighBinding="MinValue"></telerik:RangeSeries>
          <telerik:RangeSeries DisplayName="MaxValue" Stroke="#88FF0000" StrokeThickness="1" Fill="#44FF0000" ItemsSource="{Binding Data}" CategoryBinding="Timestmp" LowBinding="MaxValue" HighBinding="HighBinding"></telerik:RangeSeries>
</telerik:RadCartesianChart.Series>

Joachim
Top achievements
Rank 1
Iron
 answered on 18 Jun 2021
1 answer
650 views

I'm using the ComboBox with the autocompleter / text enabled search. 

I want to prevent the ComboBox from changing Selected Item until I actually click on an item or press enter... 

Currently the RadComboBox changes the SelectedItem when browsing the elements (arrow up or down) which is not desired.

<telerik:RadComboBox Width="150"
                                 Height="25"
                                 Margin="115,10,0,0"
                                 HorizontalAlignment="Left"
                                 VerticalAlignment="Top"
                                 DisplayMemberPath="FabrikatNavn"
                                 IsEditable="True"
                                 IsEnabled="{Binding CanChangeVariant}"
                                 ItemsSource="{Binding Source={StaticResource SortedBrands}}"
                                 OpenDropDownOnFocus="True"
                                 SelectedItem="{Binding ElementName=root, Path=BrandModel.SelectedCarBrand}"
                                 StaysOpenOnEdit="True" />

Martin
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 17 Jun 2021
2 answers
890 views

How the heck do i databind or manipulate the FullTextSearch Text ??

I've tried doing perfectly normal / sane / obvious databinding in XAML like this: 

<telerik:RadGridView TextSearch.Text="{Binding MyTextProperty}">

but that doesn't work - maybe because its not the correct property -- can't find it in documentation or as property on the radGridView instance..

I've also tried figuring out the binding example from this Forum called https://www.telerik.com/forums/bind-full-text-search-to-custom-textbox but failed to do so.. 

Why is the FullTextSearch String property not exposed in a normal behavior like with a DependencyProperty ???????

Why is this so hard ?

Why are the SearchPanel hardcoded instead of exposing a customizable panel ??

eg: If i want to add a button that clears all Search Filters , i need to make ugly hacks :(

Martin
Top achievements
Rank 2
Iron
Iron
Iron
 updated answer on 16 Jun 2021
2 answers
215 views

Hi, have you any recommendation on how best to add a footer to the RadAutoSuggestBox?

E.g. "Showing 20 results of 100"

Thanks,

Richard

Martin Ivanov
Telerik team
 answered on 16 Jun 2021
1 answer
228 views

We are using RadChartView to display some complex data. The requirement is to have a stacked column with 4 stacks above 0, 4 columns stacked below 0 and those need to have categories.

In XAML Code this looks like this:


<telerik:RadCartesianChart Tag="Text">
                    <telerik:RadCartesianChart.Grid> 
                        <telerik:CartesianChartGrid MajorLinesVisibility="Y" /> 
                    </telerik:RadCartesianChart.Grid> 
                    <telerik:RadCartesianChart.HorizontalAxis> 
                        <telerik:CategoricalAxis FontSize="11" LabelRotationAngle="45" LabelFitMode="Rotate" SmartLabelsMode="SmartStep"  /> 
                    </telerik:RadCartesianChart.HorizontalAxis> 
                    <telerik:RadCartesianChart.VerticalAxis> 
                        <telerik:LinearAxis LabelFormat="N2" SmartLabelsMode="SmartStep" /> 
                    </telerik:RadCartesianChart.VerticalAxis>
                    <telerik:RadCartesianChart.Series>
                        <telerik:BarSeries x:Name="CrNoScoreColumn"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Cr"
                                           CombineMode="Stack"
                                           ValueBinding="CrNoScore"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource SollNo}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>
                        <telerik:BarSeries x:Name="CrNoScoreColumnNegative"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Cr"
                                           CombineMode="Stack"
                                           ValueBinding="CrNoScoreNegative"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource SollNo}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>
                        <telerik:BarSeries x:Name="CrLowScoreColumn"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Cr"
                                           CombineMode="Stack"
                                           ValueBinding="CrLowScore"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource SollLow}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>
                        <telerik:BarSeries x:Name="CrLowScoreColumnNegative"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Cr"
                                           CombineMode="Stack"
                                           ValueBinding="CrLowScoreNegative"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource SollLow}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>
                        <telerik:BarSeries x:Name="CrMediumScoreColumn"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Cr"
                                           CombineMode="Stack"
                                           ValueBinding="CrMediumScore"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource SollMedium}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>
                        <telerik:BarSeries x:Name="CrMediumScoreColumnNegative"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Cr"
                                           CombineMode="Stack"
                                           ValueBinding="CrMediumScoreNegative"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource SollMedium}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>
                        <telerik:BarSeries x:Name="CrHighScoreColumn"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Cr"
                                           CombineMode="Stack"
                                           ValueBinding="CrHighScore"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource SollHigh}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>
                        <telerik:BarSeries x:Name="CrHighScoreColumnNegative"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Cr"
                                           CombineMode="Stack"
                                           ValueBinding="CrHighScoreNegative"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource SollHigh}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>
                        <telerik:BarSeries x:Name="DbNoScoreColumn"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Db"
                                           CombineMode="Stack"
                                           ValueBinding="DbNoScore"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource HabenNo}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>
                        <telerik:BarSeries x:Name="DbNoScoreColumnNegative"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Db"
                                           CombineMode="Stack"
                                           ValueBinding="DbNoScoreNegative"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource HabenNo}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>
                        <telerik:BarSeries x:Name="DbLowScoreColumn"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Db"
                                           CombineMode="Stack"
                                           ValueBinding="DbLowScore"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource HabenLow}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>
                        <telerik:BarSeries x:Name="DbLowScoreColumnNegative"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Db"
                                           CombineMode="Stack"
                                           ValueBinding="DbLowScoreNegative"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource HabenLow}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>
                        <telerik:BarSeries x:Name="DbMediumScoreColumn"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Db"
                                           CombineMode="Stack"
                                           ValueBinding="DbMediumScore"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource HabenMedium}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>
                        <telerik:BarSeries x:Name="DbMediumScoreColumnNegative"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Db"
                                           CombineMode="Stack"
                                           ValueBinding="DbMediumScoreNegative"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource HabenMedium}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>
                        <telerik:BarSeries x:Name="DbHighScoreColumn"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Db"
                                           CombineMode="Stack"
                                           ValueBinding="DbHighScore"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource HabenHigh}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>
                        <telerik:BarSeries x:Name="DbHighScoreColumnNegative"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Db"
                                           CombineMode="Stack"
                                           ValueBinding="DbHighScoreNegative"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource HabenHigh}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>
                        <telerikChartView:LineSeries ItemsSource="{Binding ChartDatas}" 
                                                     CategoryBinding="TextShort" 
                                                     ValueBinding="Count"
                                                     ToolTip="{}{Text}&#x0a;Anzahl: {y:n0}"
                                                     x:Name="Count">
                            <telerikChartView:LineSeries.StrokeShapeStyle> 
                                <Style TargetType="Path"> 
                                    <Setter Property="Stroke" Value="{StaticResource Anzahl}"/> 
                                    <Setter Property="StrokeThickness" Value="2"/> 
                                </Style> 
                            </telerikChartView:LineSeries.StrokeShapeStyle>
                            <telerikChartView:LineSeries.PointTemplate>
                                <DataTemplate> 
                                    <Rectangle Height="7" Width="7" Fill="{StaticResource Anzahl}" /> 
                                </DataTemplate> 
                            </telerikChartView:LineSeries.PointTemplate>
                            <telerikChartView:LineSeries.VerticalAxis>
                                <telerik:LinearAxis HorizontalLocation="Right"/>
                            </telerikChartView:LineSeries.VerticalAxis>
                            <telerikChartView:LineSeries.DefaultVisualStyle> 
                                <Style TargetType="Path">
                                    <Setter Property="Width" Value="10" /> 
                                    <Setter Property="Height" Value="10" /> 
                                    <Setter Property="Stroke" Value="{StaticResource Anzahl}" />
                                </Style> 
                            </telerikChartView:LineSeries.DefaultVisualStyle> 
                        </telerikChartView:LineSeries>
                    </telerik:RadCartesianChart.Series>
                </telerik:RadCartesianChart>

I attach the chart as an image to this post. You can see there is a white line with around 1 pixel on every column. i can further say the border Y position and height make this white line.

The second clue i can give is that once i remove the negative series or make their value 0, the line is gone.

for example:


<DataTemplate x:Key="ElementCrDbColumnChart"
                          DataType="{x:Type charts:ChartDataContext}">
                <telerik:RadCartesianChart Tag="Text">
                    <telerik:RadCartesianChart.Grid> 
                        <telerik:CartesianChartGrid MajorLinesVisibility="Y" /> 
                    </telerik:RadCartesianChart.Grid> 
                    <telerik:RadCartesianChart.HorizontalAxis> 
                        <telerik:CategoricalAxis FontSize="11" LabelRotationAngle="45" LabelFitMode="Rotate" SmartLabelsMode="SmartStep"  /> 
                    </telerik:RadCartesianChart.HorizontalAxis> 
                    <telerik:RadCartesianChart.VerticalAxis> 
                        <telerik:LinearAxis LabelFormat="N2" SmartLabelsMode="SmartStep" /> 
                    </telerik:RadCartesianChart.VerticalAxis>
                    <telerik:RadCartesianChart.Series>
                        <telerik:BarSeries x:Name="CrNoScoreColumn"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Cr"
                                           CombineMode="Stack"
                                           ValueBinding="CrNoScore"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource SollNo}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>
                        <!--<telerik:BarSeries x:Name="CrNoScoreColumnNegative"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Cr"
                                           CombineMode="Stack"
                                           ValueBinding="CrNoScoreNegative"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource SollNo}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>-->
                        <telerik:BarSeries x:Name="CrLowScoreColumn"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Cr"
                                           CombineMode="Stack"
                                           ValueBinding="CrLowScore"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource SollLow}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>
                        <!--<telerik:BarSeries x:Name="CrLowScoreColumnNegative"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Cr"
                                           CombineMode="Stack"
                                           ValueBinding="CrLowScoreNegative"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource SollLow}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>-->
                        <telerik:BarSeries x:Name="CrMediumScoreColumn"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Cr"
                                           CombineMode="Stack"
                                           ValueBinding="CrMediumScore"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource SollMedium}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>
                        <!--<telerik:BarSeries x:Name="CrMediumScoreColumnNegative"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Cr"
                                           CombineMode="Stack"
                                           ValueBinding="CrMediumScoreNegative"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource SollMedium}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>-->
                        <telerik:BarSeries x:Name="CrHighScoreColumn"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Cr"
                                           CombineMode="Stack"
                                           ValueBinding="CrHighScore"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource SollHigh}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>
                        <!--<telerik:BarSeries x:Name="CrHighScoreColumnNegative"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Cr"
                                           CombineMode="Stack"
                                           ValueBinding="CrHighScoreNegative"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource SollHigh}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>-->
                        <telerik:BarSeries x:Name="DbNoScoreColumn"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Db"
                                           CombineMode="Stack"
                                           ValueBinding="DbNoScore"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource HabenNo}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>
                        <!--<telerik:BarSeries x:Name="DbNoScoreColumnNegative"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Db"
                                           CombineMode="Stack"
                                           ValueBinding="DbNoScoreNegative"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource HabenNo}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>-->
                        <telerik:BarSeries x:Name="DbLowScoreColumn"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Db"
                                           CombineMode="Stack"
                                           ValueBinding="DbLowScore"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource HabenLow}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>
                        <!--<telerik:BarSeries x:Name="DbLowScoreColumnNegative"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Db"
                                           CombineMode="Stack"
                                           ValueBinding="DbLowScoreNegative"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource HabenLow}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>-->
                        <telerik:BarSeries x:Name="DbMediumScoreColumn"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Db"
                                           CombineMode="Stack"
                                           ValueBinding="DbMediumScore"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource HabenMedium}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>
                        <!--<telerik:BarSeries x:Name="DbMediumScoreColumnNegative"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Db"
                                           CombineMode="Stack"
                                           ValueBinding="DbMediumScoreNegative"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource HabenMedium}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>-->
                        <telerik:BarSeries x:Name="DbHighScoreColumn"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Db"
                                           CombineMode="Stack"
                                           ValueBinding="DbHighScore"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource HabenHigh}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>
                        <!--<telerik:BarSeries x:Name="DbHighScoreColumnNegative"
                                           ToolTip="{}{Text}&#x0a;Summe: {y:n2}"
                                           ItemsSource="{Binding ChartDatas}" 
                                           CategoryBinding="TextShort"
                                           StackGroupKey="Db"
                                           CombineMode="Stack"
                                           ValueBinding="DbHighScoreNegative"
                                           PaletteMode="Series" >
                            <telerik:BarSeries.DefaultVisualStyle>
                                <Style TargetType="Border">
                                    <Setter Property="Padding" Value="1" />
                                    <Setter Property="BorderThickness" Value="1,0" />
                                    <Setter Property="Background" Value="{StaticResource HabenHigh}" />
                                </Style>
                            </telerik:BarSeries.DefaultVisualStyle>
                        </telerik:BarSeries>-->
                        <telerikChartView:LineSeries ItemsSource="{Binding ChartDatas}" 
                                                     CategoryBinding="TextShort" 
                                                     ValueBinding="Count"
                                                     ToolTip="{}{Text}&#x0a;Anzahl: {y:n0}"
                                                     x:Name="Count">
                            <telerikChartView:LineSeries.StrokeShapeStyle> 
                                <Style TargetType="Path"> 
                                    <Setter Property="Stroke" Value="{StaticResource Anzahl}"/> 
                                    <Setter Property="StrokeThickness" Value="2"/> 
                                </Style> 
                            </telerikChartView:LineSeries.StrokeShapeStyle>
                            <telerikChartView:LineSeries.PointTemplate>
                                <DataTemplate> 
                                    <Rectangle Height="7" Width="7" Fill="{StaticResource Anzahl}" /> 
                                </DataTemplate> 
                            </telerikChartView:LineSeries.PointTemplate>
                            <telerikChartView:LineSeries.VerticalAxis>
                                <telerik:LinearAxis HorizontalLocation="Right"/>
                            </telerikChartView:LineSeries.VerticalAxis>
                            <telerikChartView:LineSeries.DefaultVisualStyle> 
                                <Style TargetType="Path">
                                    <Setter Property="Width" Value="10" /> 
                                    <Setter Property="Height" Value="10" /> 
                                    <Setter Property="Stroke" Value="{StaticResource Anzahl}" />
                                </Style> 
                            </telerikChartView:LineSeries.DefaultVisualStyle> 
                        </telerikChartView:LineSeries>
                    </telerik:RadCartesianChart.Series>
                </telerik:RadCartesianChart>
            </DataTemplate>

result in a chart with no white line. the same data. everything the same except for the barseries.

As a second side question: why is the line series not drawn? Any idea - it worked and some day without changes it disappeared and only the points are still drawn.

 

i hope we can get some solution here soon. we need this to work under any circumstances and with alle the above mentioned requirements. since we have telerik and componentone licences we will try to use their chart control for the time being but i would really want to use telerik if possible.

Martin Ivanov
Telerik team
 answered on 15 Jun 2021
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?