File tree Expand file tree Collapse file tree 5 files changed +11
-64
lines changed
src/skiasharp/LiveChartsCore.SkiaSharpView.Blazor Expand file tree Collapse file tree 5 files changed +11
-64
lines changed Original file line number Diff line number Diff line change 22
22
SOFTWARE.
23
23
*@
24
24
25
+ <!--
26
+ the first wrapper <div/> is required so blazor is able to the isolate the css, do not remove!
27
+ blazor bug?
28
+ -->
29
+
25
30
<div class =" lvc-content" >
26
- <JsFlexibleContainer @ref =" _jsFlexibleContainer" Class = " @ContainerActualClass " >
31
+ <JsFlexibleContainer @ref =" _jsFlexibleContainer" >
27
32
<Content >
28
33
<div class =" lvc-canvas-container" @ref =" CanvasContainerElement" >
29
34
<MotionCanvas
Original file line number Diff line number Diff line change @@ -57,11 +57,6 @@ protected ChartControl()
57
57
/// <inheritdoc cref="IChartView.CoreCanvas"/>
58
58
public MotionCanvas CanvasView => _motionCanvas ;
59
59
60
- /// <summary>
61
- /// Gets the actual class.
62
- /// </summary>
63
- public string ContainerActualClass => $ "lvc-chart-container { ContainerClass } ";
64
-
65
60
/// <inheritdoc cref="IBlazorChart.CanvasContainerElement"/>
66
61
public ElementReference CanvasContainerElement { get ; private set ; }
67
62
@@ -77,10 +72,13 @@ protected override void OnAfterRender(bool firstRender)
77
72
StartObserving ( ) ;
78
73
79
74
_jsFlexibleContainer . Resized +=
80
- container => CoreChart ? . Update ( ) ;
75
+ container =>
76
+ CoreChart ? . Update ( ) ;
81
77
82
78
CoreChart . Canvas . Sync = SyncContext ;
83
79
CoreChart . Load ( ) ;
80
+
81
+ var size = ( ( IChartView ) this ) . ControlSize ;
84
82
}
85
83
86
84
bool IChartView . DesignerMode => false ;
Original file line number Diff line number Diff line change 8
8
width : 100% ;
9
9
}
10
10
11
- ::deep .lvc-chart-container {
12
- height : 100% ;
13
- width : 100% ;
14
-
15
- display : -ms-flexbox;
16
- display : -webkit-flex;
17
- display : flex;
18
- -webkit-flex-direction : row;
19
- -ms-flex-direction : row;
20
- flex-direction : row;
21
- -webkit-flex-wrap : nowrap;
22
- -ms-flex-wrap : nowrap;
23
- flex-wrap : nowrap;
24
- -webkit-justify-content : flex-start;
25
- -ms-flex-pack : start;
26
- justify-content : flex-start;
27
- -webkit-align-content : stretch;
28
- -ms-flex-line-pack : stretch;
29
- align-content : stretch;
30
- -webkit-align-items : center;
31
- -ms-flex-align : center;
32
- align-items : center;
33
- }
34
-
35
- ::deep .lvc-chart-container .column {
36
- display : -ms-flexbox;
37
- display : -webkit-flex;
38
- display : flex;
39
- -webkit-flex-direction : column;
40
- -ms-flex-direction : column;
41
- flex-direction : column;
42
- -webkit-flex-wrap : nowrap;
43
- -ms-flex-wrap : nowrap;
44
- flex-wrap : nowrap;
45
- -webkit-justify-content : flex-start;
46
- -ms-flex-pack : start;
47
- justify-content : flex-start;
48
- -webkit-align-content : stretch;
49
- -ms-flex-line-pack : stretch;
50
- align-content : stretch;
51
- -webkit-align-items : center;
52
- -ms-flex-align : center;
53
- align-items : center;
54
- }
55
-
56
11
::deep .lvc-canvas-container {
57
12
height : 100% ;
58
13
width : 100% ;
65
20
-ms-flex-item-align : auto;
66
21
align-self : auto;
67
22
}
68
-
69
- ::deep .lvc-miniature {
70
- margin-right : 4px ;
71
- margin-left : 4px ;
72
- }
Original file line number Diff line number Diff line change 22
22
SOFTWARE.
23
23
*@
24
24
25
- <div @ref =" Container" class = " @Class " >
25
+ <div @ref =" Container" >
26
26
@Content
27
27
</div >
28
28
Original file line number Diff line number Diff line change @@ -65,12 +65,6 @@ public partial class JsFlexibleContainer : IDisposable
65
65
[ Parameter ]
66
66
public RenderFragment ? Content { get ; set ; }
67
67
68
- /// <summary>
69
- /// Gets or sets the container class.
70
- /// </summary>
71
- [ Parameter ]
72
- public string Class { get ; set ; } = string . Empty ;
73
-
74
68
/// <summary>
75
69
/// Called when the control is resized.
76
70
/// </summary>
You can’t perform that action at this time.
0 commit comments