-
Notifications
You must be signed in to change notification settings - Fork 636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DYN-6015 LiveCharts2 migration for net6 #14209
Conversation
hi @zeusongit Even after I retried the build action, it failed again.. Also I assume this is safe to bring to 2.19 release? |
/// <summary> | ||
/// Helper class providing chart style parameters | ||
/// </summary> | ||
public static class ChartStyle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍🏻
src/Libraries/CoreNodeModelsWpf/Charts/Controls/BarChartControl.xaml.cs
Outdated
Show resolved
Hide resolved
@@ -110,6 +110,8 @@ private void View_Closing(object sender, System.ComponentModel.CancelEventArgs e | |||
|
|||
async void SuspendCoreWebviewAsync() | |||
{ | |||
if (notificationUIPopup == null) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you foresee a bug somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this was throwing an exception during Debug
<PackageReference Include="DotNetProjects.Extended.Wpf.Toolkit" Version="5.0.103" /> | ||
<PackageReference Include="LiveChartsCore" Version="2.0.0-beta.855" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any binary diff?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the VS2022 build is failing, the bindiff job is failing as well, the PR does bring in some Livecharts2 and skiasharp binaries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks solid with some comments, just curious have you tested in D4R yet?
I did not downgrade the Newtonsoft to 13.0.1, it is unchanged in the PR, did some other PR downgrade it before this PR? |
I thought we have been using Newtonsoft 13.0.1 for a while, any reason that made you mention downgrade? |
@@ -60,7 +56,7 @@ public class BarChartNodeModel : NodeModel | |||
/// <summary> | |||
/// Bar chart color values. | |||
/// </summary> | |||
public List<SolidColorBrush> Colors { get; set; } | |||
public List<Color> Colors { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is public - ideally we would obsolete the old property, and redirect it to to use and update the new one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense since this was officially added in 2.18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in addition @zeusongit @QilongTang - if this is going into 2.19 then we'll need to keep the old live charts binaries in the legacy_remove_me
folder so they get copied.
If this is only going into a 3.0 release then we can forget the API break, and not include the binaries. I'm not sure that is an option though...? @jasonstratton @pinzart90 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can RC branch 2.19 early and make this a Dynamo 3.0 change, the downside is that chart nodes will not be tested in test fest early because that event is targeting 2.19 NET6 build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can always merge and then revert - it's not clear to me this will be done by than anyway...?
That is what I saw in the error log:
|
|
28 files added? That is a lot |
Yep
For net6:
|
This reverts commit 06355fd.
@@ -140,10 +140,6 @@ | |||
<PackageReference Include="SharpDX.Mathematics" Version="4.2.0" /> | |||
<Reference Include="Dynamo.Microsoft.Xaml.Behaviors"> | |||
<HintPath>..\..\extern\Microsoft.Xaml.Behaviors\$(TargetFramework)\Dynamo.Microsoft.Xaml.Behaviors.dll</HintPath> | |||
</Reference> | |||
<PackageReference Include="Prism.Core" Version="8.1.97" Condition=" '$(TargetFramework)' != 'net48' " /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should have left in there
Maybe just remove the condition attribute (ex )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed it since it is already referenced in the line below it.
https://github.com/DynamoDS/Dynamo/pull/14209/files/e23d79094af0f648d893c2a3fcb07c9c47627ba9..efebe65238c7dee671845e6834945248f5828120#diff-3a61f1c3321e4a236dbd60644db81ea7d71eb5eb709191187126610ff76abd09R145
@zeusongit @mjkkirschner @QilongTang a lot of public APIs have been changed (all in the UI layer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we consider the breaking the API for 3.0 is ok, then LGTM
|
Please check the milestone field of the PR for the release target. @mjkkirschner @pinzart90 not targeting 2.19 |
@zeusongit were you able to resolve the newtonsoft issue? |
Yes, by including version 13.0.2 |
so... now we reference both versions? This project references 13.0.2 and every other project references 13.0.1? What does Revit reference? |
Everything else uses 13.0.1 |
@zeusongit I don't think that is good. It could work out okay, but it would be best if we can unify on 13.0.1. Can you look into it a bit and we can meet up later this week to discuss options? |
Just use version 2.0.0-beta.603 of LiveChartsCore and LiveChartsCore.SkiaSharpView.WPF. These have a dep on NewtonSoft 13.0.1. Hopefully no drastic changes in between these versions of livecharts. |
This comment was marked as outdated.
This comment was marked as outdated.
This reverts commit 582c5d8.
I see that you reverted this, did it not work? |
// Save document | ||
string filename = dialog.FileName; | ||
image.Save(filename, ImageFormat.Png); | ||
Console.WriteLine("Chart Image Export Error:" + ex.Message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this try-catch or was this also for your debugging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is Console.WriteLine visible in the Dynamo console UI ? or at least in the console logs ?
Do we have access to the Dynamo Logger here ?
I say we should let the exception bubble up, unless it is something very specific you are trying to catch here @zeusongit .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was for test as well, LC2 has summed up all charts into 2 types, SKCartesian and Pie, but there is one more Geo charts which are not yet implemented, so was testing if any of the existing charts throw an exception while exporting image.
Purpose
https://jira.autodesk.com/browse/DYN-6015
Updated dependency for chart nodes to LiveCharts2 from version 1 that was not net6 compatible.
This change will introduce new
SkiaSharp
graphic libraryOld Charts:
New Charts:
All charts Export Output Image:
Declarations
Check these if you believe they are true
*.resx
filesRelease Notes
Reviewers
@DynamoDS/dynamo
FYIs
@dnenov