|
3 | 3 | xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" |
4 | 4 | x:Class="DisplayTrackballValues.MainPage" |
5 | 5 | xmlns:chart="clr-namespace:Syncfusion.Maui.Charts;assembly=Syncfusion.Maui.Charts" |
6 | | - xmlns:listView="clr-namespace:Syncfusion.Maui.ListView;assembly=Syncfusion.Maui.ListView" |
7 | 6 | xmlns:local="clr-namespace:DisplayTrackballValues"> |
8 | 7 |
|
9 | 8 | <ContentPage.BindingContext> |
|
30 | 29 | <chart:ChartTrackballBehavior ShowLabel="False"/> |
31 | 30 | </chart:SfCartesianChart.TrackballBehavior> |
32 | 31 |
|
33 | | - <chart:LineSeries ItemsSource="{Binding Data}" |
| 32 | + <chart:SfCartesianChart.Legend> |
| 33 | + <chart:ChartLegend/> |
| 34 | + </chart:SfCartesianChart.Legend> |
| 35 | + |
| 36 | + <chart:LineSeries ItemsSource="{Binding ProductSalesDetails}" |
| 37 | + x:Name="series1" |
34 | 38 | StrokeWidth="3" |
35 | 39 | XBindingPath="Date" |
36 | | - YBindingPath="YValue1" |
37 | | - ShowTrackballLabel="True" |
38 | | - Fill="Pink"/> |
39 | | - <chart:LineSeries ItemsSource="{Binding Data}" |
| 40 | + YBindingPath="ProductASales" |
| 41 | + ShowTrackballLabel="True" |
| 42 | + Label="Product A" |
| 43 | + Fill="RoyalBlue"/> |
| 44 | + <chart:LineSeries ItemsSource="{Binding ProductSalesDetails}" |
| 45 | + x:Name="series2" |
40 | 46 | StrokeWidth="3" |
41 | 47 | XBindingPath="Date" |
42 | | - YBindingPath="YValue2" |
| 48 | + YBindingPath="ProductBSales" |
43 | 49 | ShowTrackballLabel="True" |
44 | | - Fill="LightBlue"/> |
45 | | - <chart:LineSeries ItemsSource="{Binding Data}" |
| 50 | + Label="Product B" |
| 51 | + Fill="HotPink"/> |
| 52 | + <chart:LineSeries ItemsSource="{Binding ProductSalesDetails}" |
| 53 | + x:Name="series3" |
46 | 54 | StrokeWidth="3" |
47 | 55 | XBindingPath="Date" |
48 | | - YBindingPath="YValue3" |
| 56 | + YBindingPath="ProductCSales" |
49 | 57 | ShowTrackballLabel="True" |
50 | | - Fill="LightGreen"/> |
| 58 | + Label="Product C" |
| 59 | + Fill="Green"/> |
51 | 60 |
|
52 | 61 | </chart:SfCartesianChart> |
53 | | - <VerticalStackLayout Grid.Column="1"> |
| 62 | + <VerticalStackLayout Grid.Column="1" HorizontalOptions="Center"> |
54 | 63 | <Label HorizontalOptions="Center" Text="Trackball Values" FontAttributes="Bold"/> |
55 | | - <ListView x:Name="listView" > |
56 | | - <ListView.ItemTemplate> |
57 | | - <DataTemplate> |
58 | | - <ViewCell> |
59 | | - <Frame Background="{Binding Series.Fill}" CornerRadius="8" Margin="5" BorderColor="Gray"> |
60 | | - <HorizontalStackLayout HorizontalOptions="Center" Spacing="10" VerticalOptions="Center" > |
61 | | - <Label Text="{Binding DataItem.Date, StringFormat='{0:dd/MM/yyyy}'}" |
62 | | - FontSize="14" |
63 | | - FontAttributes="Bold" |
64 | | - TextColor="Black" |
65 | | - VerticalOptions="Center"/> |
66 | | - <Label Text=" : " |
67 | | - FontSize="14" |
68 | | - FontAttributes="Bold" |
69 | | - TextColor="Black" |
70 | | - VerticalOptions="Center"/> |
71 | | - <Label Text="{Binding Label}" |
72 | | - FontSize="14" |
73 | | - FontAttributes="Bold" |
74 | | - TextColor="Black" |
75 | | - VerticalOptions="Center"/> |
76 | | - </HorizontalStackLayout> |
77 | | - </Frame> |
78 | | - </ViewCell> |
79 | | - </DataTemplate> |
80 | | - </ListView.ItemTemplate> |
81 | | - </ListView> |
| 64 | + <VerticalStackLayout> |
| 65 | + <Frame Background="LightBlue" CornerRadius="8" Margin="5" BorderColor="Gray"> |
| 66 | + <HorizontalStackLayout HorizontalOptions="Center" Spacing="10" VerticalOptions="Center" > |
| 67 | + <Label x:Name="dateLabel1" |
| 68 | + FontSize="14" |
| 69 | + FontAttributes="Bold" |
| 70 | + TextColor="Black" |
| 71 | + VerticalOptions="Center"/> |
| 72 | + <Label Text=" : " |
| 73 | + FontSize="14" |
| 74 | + FontAttributes="Bold" |
| 75 | + TextColor="Black" |
| 76 | + VerticalOptions="Center"/> |
| 77 | + <Label x:Name="valueLabel1" |
| 78 | + FontSize="14" |
| 79 | + FontAttributes="Bold" |
| 80 | + TextColor="Black" |
| 81 | + VerticalOptions="Center"/> |
| 82 | + </HorizontalStackLayout> |
| 83 | + </Frame> |
| 84 | + </VerticalStackLayout> |
| 85 | + <VerticalStackLayout> |
| 86 | + <Frame Background="Pink" CornerRadius="8" Margin="5" BorderColor="Gray"> |
| 87 | + <HorizontalStackLayout HorizontalOptions="Center" Spacing="10" VerticalOptions="Center" > |
| 88 | + <Label x:Name="dateLabel2" |
| 89 | + FontSize="14" |
| 90 | + FontAttributes="Bold" |
| 91 | + TextColor="Black" |
| 92 | + VerticalOptions="Center"/> |
| 93 | + <Label Text=" : " |
| 94 | + FontSize="14" |
| 95 | + FontAttributes="Bold" |
| 96 | + TextColor="Black" |
| 97 | + VerticalOptions="Center"/> |
| 98 | + <Label x:Name="valueLabel2" |
| 99 | + FontSize="14" |
| 100 | + FontAttributes="Bold" |
| 101 | + TextColor="Black" |
| 102 | + VerticalOptions="Center"/> |
| 103 | + </HorizontalStackLayout> |
| 104 | + </Frame> |
| 105 | + </VerticalStackLayout> |
| 106 | + <VerticalStackLayout> |
| 107 | + <Frame Background="LightGreen" CornerRadius="8" Margin="5" BorderColor="Gray"> |
| 108 | + <HorizontalStackLayout HorizontalOptions="Center" Spacing="10" VerticalOptions="Center" > |
| 109 | + <Label x:Name="dateLabel3" |
| 110 | + FontSize="14" |
| 111 | + FontAttributes="Bold" |
| 112 | + TextColor="Black" |
| 113 | + VerticalOptions="Center"/> |
| 114 | + <Label Text=" : " |
| 115 | + FontSize="14" |
| 116 | + FontAttributes="Bold" |
| 117 | + TextColor="Black" |
| 118 | + VerticalOptions="Center"/> |
| 119 | + <Label x:Name="valueLabel3" |
| 120 | + FontSize="14" |
| 121 | + FontAttributes="Bold" |
| 122 | + TextColor="Black" |
| 123 | + VerticalOptions="Center"/> |
| 124 | + </HorizontalStackLayout> |
| 125 | + </Frame> |
| 126 | + </VerticalStackLayout> |
82 | 127 | </VerticalStackLayout> |
83 | | - |
84 | 128 | </Grid> |
85 | 129 |
|
86 | 130 | </ContentPage> |
0 commit comments