Chart is not look OK

1 Answer 93 Views
Chart
Daniel
Top achievements
Rank 1
Silver
Bronze
Daniel asked on 08 Mar 2022, 10:33 AM

Hi,

I used your document: https://docs.telerik.com/devtools/maui/controls/chart/chart-getting-started

And the chart not look ok, it get out of view in the bottom I want to see the name properly.


<ContentView.Content>
        <Grid RowSpacing="25" RowDefinitions="auto, auto, auto,auto, auto,*" ColumnDefinitions="*">
           
            <Label Grid.Row="3" Grid.Column="0" Text="Total Files Divided By Routes" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand"/>
            <telerikChart:RadCartesianChart Grid.Row="4" Grid.Column="0">
                <telerikChart:RadCartesianChart.BindingContext>
                    <local:CategoricalDataViewModel />
                </telerikChart:RadCartesianChart.BindingContext>
                <telerikChart:RadCartesianChart.HorizontalAxis>
                    <telerikChart:CategoricalAxis PlotMode="OnTicks"
                                    MajorTickInterval="2"
                                    GapLength="0.5"/>
                </telerikChart:RadCartesianChart.HorizontalAxis>
                <telerikChart:RadCartesianChart.VerticalAxis>
                    <telerikChart:NumericalAxis LabelFitMode="MultiLine" />
                </telerikChart:RadCartesianChart.VerticalAxis>
                <telerikChart:RadCartesianChart.Series>
                    <telerikChart:BarSeries ValueBinding="Value"
                                    CategoryBinding="Category"
                                    ItemsSource="{Binding Data}" />
                </telerikChart:RadCartesianChart.Series>
            </telerikChart:RadCartesianChart>
        </Grid>
    </ContentView.Content>

Daniel
Top achievements
Rank 1
Silver
Bronze
commented on 08 Mar 2022, 10:34 AM

The first is Push with value 1 + second with Push2  value of 2
Daniel
Top achievements
Rank 1
Silver
Bronze
commented on 08 Mar 2022, 10:50 AM

The second value is missing, the UI now look better

1 Answer, 1 is accepted

Sort by
0
Didi
Telerik team
answered on 10 Mar 2022, 01:05 PM

Hello Daniel,

The chart bars visualization seems to be a layout issue and it is not related to the chart control. In order to workaround it set a definitive  height to the grid row where the chart is positioned.

Regarding to the issue with the horizontal axis label visualization, the behavior is expected as you have set the MajorTickInterval="2"  to the CategoricalAxis(Horizontal Axis).  For more details about this property review the following link from our documentation https://docs.telerik.com/devtools/maui/controls/chart/axes/axes-categorical-axis#features 

Regards,
Didi
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Daniel
Top achievements
Rank 1
Silver
Bronze
commented on 10 Mar 2022, 01:52 PM

I removed these two properties and its  OK now

MajorTickInterval="2" && GapLength="0.5"
 <telerikChart:CategoricalAxis PlotMode="OnTicks"
                                    MajorTickInterval="2"
                                    GapLength="0.5"/>

Tags
Chart
Asked by
Daniel
Top achievements
Rank 1
Silver
Bronze
Answers by
Didi
Telerik team
Share this question
or