-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add upgrades for Typescript 4.1 and CombinedUserChartPart
- Loading branch information
1 parent
c8f5aa5
commit ef0eee9
Showing
4 changed files
with
68 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Security.Cryptography.X509Certificates; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Signum.Upgrade.Upgrades | ||
{ | ||
class Upgrade_20201123_Typescript41 : CodeUpgradeBase | ||
{ | ||
public override string Description => "Update to Typescript 4.1"; | ||
|
||
public override string SouthwindCommitHash => "60d43b2f94249ff9ef0ee36eaecc1b7fc8f65c71"; | ||
|
||
public override void Execute(UpgradeContext uctx) | ||
{ | ||
uctx.ChangeCodeFile("Southwind.React/package.json", file => | ||
{ | ||
file.UpdateNpmPackage("ts-loader", "8.0.11"); | ||
file.UpdateNpmPackage("typescript", "4.1.2"); | ||
}); | ||
|
||
uctx.ChangeCodeFile("Southwind.React/Southwind.React.csproj", file => | ||
{ | ||
file.UpdateNugetReference("Microsoft.TypeScript.MSBuild", "4.1.2"); | ||
}); | ||
|
||
uctx.ChangeCodeFile("Southwind.React/tsconfig.json", file => | ||
{ | ||
file.RemoveAllLines(a => a.Contains(@"""baseUrl"": ""."",")); | ||
file.Replace("*", "./*"); | ||
}); | ||
} | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
Signum.Upgrade/Upgrades/Upgrade_20201124_CombinedUserChartPart.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Security.Cryptography.X509Certificates; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Signum.Upgrade.Upgrades | ||
{ | ||
class Upgrade_20201124_CombinedUserChartPart : CodeUpgradeBase | ||
{ | ||
public override string Description => "CombinedUserChartPart"; | ||
|
||
public override string SouthwindCommitHash => "5d87563412c238710d184528853d65f67848d03c"; | ||
|
||
public override void Execute(UpgradeContext uctx) | ||
{ | ||
uctx.ChangeCodeFile("Southwind.Logic/Starter.cs", file => | ||
{ | ||
file.Replace( | ||
"typeof(UserChartPartEntity),", | ||
"typeof(UserChartPartEntity), typeof(CombinedUserChartPartEntity),"); | ||
}); | ||
} | ||
} | ||
} |
ef0eee9
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.
Presenting
CombinedUserChartPart
Since Charting module is optimized to design a chart and build the query to fill the data at the same time, it was never able to combine data from different sources like this one made in Excel:
Changing the interactive
ChartViewer
control to work with N different queries is a big undertake, and will complicate the UI a lot, but thanks toCombinedUserChartPart
we can now combine multipleUserCharts
and visualize such a combination in aDashboard
:The result when visualizing the dashboard is:
Each UserChart is free to use his own queryName, filters or parameters. In case of conflicting parameters (like the label margins) the parameters from the first user chart will be taken.
Currently you can combine any number of
ChartScripts
as long as they are of typeLine
andColumn
. If more than oneColumn
UserChart
is selected, they split the available space like in the image.Also by checking
Use same scale
the same vertical scale will be used for all theUserCharts
, considering the values of all the charts, but configured following the parameters of the first one.Just run
Upgrade_20201124_CombinedUserChartPart
to get this new feature!ef0eee9
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.
ef0eee9
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.
ef0eee9
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.
Thanks! That's a great and very useful feature! 👏