From 1e798d3045a2f789ba9307da12692435014c3ebf Mon Sep 17 00:00:00 2001 From: artemiusgreat Date: Mon, 23 Sep 2024 21:00:00 -0400 Subject: [PATCH] Sync --- Canvas.Core/Canvas.Core.csproj | 2 +- Canvas.Core/Composers/Composer.cs | 6 +++--- Canvas.Core/Shapes/CandleShape.cs | 12 ++++++------ Canvas.Views.Web/Canvas.Views.Web.csproj | 2 +- Canvas.Views.Web/Views/CanvasGroupView.razor.cs | 8 +++++--- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Canvas.Core/Canvas.Core.csproj b/Canvas.Core/Canvas.Core.csproj index 9025c4d..f20ac49 100644 --- a/Canvas.Core/Canvas.Core.csproj +++ b/Canvas.Core/Canvas.Core.csproj @@ -5,7 +5,7 @@ disable disable True - 3.2.4 + 3.2.5 Internal package used in Canvas.Views.Web artemiusgreat indemos.com diff --git a/Canvas.Core/Composers/Composer.cs b/Canvas.Core/Composers/Composer.cs index f0a4966..271a8ef 100644 --- a/Canvas.Core/Composers/Composer.cs +++ b/Canvas.Core/Composers/Composer.cs @@ -206,7 +206,7 @@ public class Composer : IComposer /// public Composer() { - Size = 0.5; + Size = 0.4; ValueCount = 3; IndexCount = 9; @@ -326,8 +326,8 @@ public virtual DataModel GetItemPosition(IEngine engine, DataModel item) // Percentage to pixels, Y is inverted - item.X = Math.Round(engine.X * index, MidpointRounding.ToZero); - item.Y = Math.Round(engine.Y - engine.Y * value, MidpointRounding.ToZero); + item.X = engine.X * index; + item.Y = engine.Y - engine.Y * value; return item; } diff --git a/Canvas.Core/Shapes/CandleShape.cs b/Canvas.Core/Shapes/CandleShape.cs index 58d3468..19b2f9f 100644 --- a/Canvas.Core/Shapes/CandleShape.cs +++ b/Canvas.Core/Shapes/CandleShape.cs @@ -51,11 +51,11 @@ public override double[] GetDomain(int index, string name, IList items) return null; } - return new double[] - { + return + [ L.Value, H.Value - }; + ]; } /// @@ -66,13 +66,13 @@ public override double[] GetDomain(int index, string name, IList items) /// public override IList GetSeriesValues(DataModel view, DataModel coordinates) { - return new double[] - { + return + [ O ?? 0, H ?? 0, L ?? 0, C ?? 0 - }; + ]; } /// diff --git a/Canvas.Views.Web/Canvas.Views.Web.csproj b/Canvas.Views.Web/Canvas.Views.Web.csproj index 2a9d138..081cd3d 100644 --- a/Canvas.Views.Web/Canvas.Views.Web.csproj +++ b/Canvas.Views.Web/Canvas.Views.Web.csproj @@ -10,7 +10,7 @@ true True - 3.2.4 + 3.2.5 finance chart opengl canvas trading gdi stock direct2d artemiusgreat indemos.com diff --git a/Canvas.Views.Web/Views/CanvasGroupView.razor.cs b/Canvas.Views.Web/Views/CanvasGroupView.razor.cs index a89f9cd..2a12dc3 100644 --- a/Canvas.Views.Web/Views/CanvasGroupView.razor.cs +++ b/Canvas.Views.Web/Views/CanvasGroupView.razor.cs @@ -74,17 +74,19 @@ await view.Value.Create(() => /// /// /// - public virtual void Update(DomainModel message, IList items = null) + public virtual Task Update(DomainModel message, IList items = null) { - Views.ForEach(o => + var processes = Views.Select(o => { if (items is not null) { o.Value.Composer.Items = items; } - o.Value.Composer.Update(message); + return o.Value.Composer.Update(message); }); + + return Task.WhenAll(processes); } ///