diff --git a/viz/ts/svg/svg.sln b/viz/ts/svg/svg.sln
index 50bd8ef..21ed58f 100644
--- a/viz/ts/svg/svg.sln
+++ b/viz/ts/svg/svg.sln
@@ -4,9 +4,14 @@ Microsoft Visual Studio Solution File, Format Version 12.00
VisualStudioVersion = 15.0.27428.2027
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "thinkChart", "thinkChart\thinkChart.njsproj", "{F3C0F5AB-B554-4EF8-9DF0-482240FE020D}"
+ ProjectSection(ProjectDependencies) = postProject
+ {8C2DAE18-8B11-4B37-A4EC-0234D7FCCF2A} = {8C2DAE18-8B11-4B37-A4EC-0234D7FCCF2A}
+ EndProjectSection
EndProject
Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "Linq.ts", "..\TsLinq\Linq.ts\Linq.ts.njsproj", "{E0AEC189-6D05-47E4-9F69-DAFE43AC8398}"
EndProject
+Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "svg", "svg\SVG\svg.njsproj", "{8C2DAE18-8B11-4B37-A4EC-0234D7FCCF2A}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -21,6 +26,10 @@ Global
{E0AEC189-6D05-47E4-9F69-DAFE43AC8398}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E0AEC189-6D05-47E4-9F69-DAFE43AC8398}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E0AEC189-6D05-47E4-9F69-DAFE43AC8398}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8C2DAE18-8B11-4B37-A4EC-0234D7FCCF2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8C2DAE18-8B11-4B37-A4EC-0234D7FCCF2A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8C2DAE18-8B11-4B37-A4EC-0234D7FCCF2A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8C2DAE18-8B11-4B37-A4EC-0234D7FCCF2A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/viz/ts/svg/svg/SVG/svg.njsproj b/viz/ts/svg/svg/SVG/svg.njsproj
index 51b35c2..e763d62 100644
--- a/viz/ts/svg/svg/SVG/svg.njsproj
+++ b/viz/ts/svg/svg/SVG/svg.njsproj
@@ -7,7 +7,7 @@
svg
Debug|Any CPU
True
- 2.9
+ 2.8
@@ -26,7 +26,7 @@
1337
true
CommonJS
- 2.8
+ 3.0
true
True
diff --git a/viz/ts/svg/thinkChart/Math/Layout/Anchor.ts b/viz/ts/svg/thinkChart/Math/Layout/Anchor.ts
new file mode 100644
index 0000000..c41caf0
--- /dev/null
+++ b/viz/ts/svg/thinkChart/Math/Layout/Anchor.ts
@@ -0,0 +1,6 @@
+namespace Layout {
+
+ export class Anchor {
+
+ }
+}
\ No newline at end of file
diff --git a/viz/ts/svg/thinkChart/Math/Layout/Label.ts b/viz/ts/svg/thinkChart/Math/Layout/Label.ts
new file mode 100644
index 0000000..779d1e5
--- /dev/null
+++ b/viz/ts/svg/thinkChart/Math/Layout/Label.ts
@@ -0,0 +1,6 @@
+namespace Layout {
+
+ export class Label {
+
+ }
+}
\ No newline at end of file
diff --git a/viz/ts/svg/thinkChart/Math/Layout/Labeler.ts b/viz/ts/svg/thinkChart/Math/Layout/Labeler.ts
index 39ba248..bd2c869 100644
--- a/viz/ts/svg/thinkChart/Math/Layout/Labeler.ts
+++ b/viz/ts/svg/thinkChart/Math/Layout/Labeler.ts
@@ -2,8 +2,8 @@
export class Labeler {
- private lab = [];
- private anc = [];
+ private lab: Label[] = [];
+ private anc: Anchor[] = [];
private w = 1; // box width
private h = 1; // box width
@@ -12,20 +12,14 @@
private acc = 0;
private rej = 0;
- //#region "weights"
- private w_len = 0.2; // leader line length
- private w_inter = 1.0; // leader line intersection
- private w_lab2 = 30.0; // label-label overlap
- private w_lab_anc = 30.0; // label-anchor overlap
- private w_orient = 3.0; // orientation bias
- //#endregion
-
//#region ""
+ private weights: Weights;
private energy_function: (index: number) => number;
private schedule_function: (currT: number, initialT: number, nsweeps: number) => number;
//#endregion
public constructor(
+ weights: Weights = new Weights(),
energy: (index: number) => number = null,
schedule: (currT: number, initialT: number, nsweeps: number) => number = Labeler.cooling_schedule) {
diff --git a/viz/ts/svg/thinkChart/Math/Layout/Weights.ts b/viz/ts/svg/thinkChart/Math/Layout/Weights.ts
new file mode 100644
index 0000000..d3c641c
--- /dev/null
+++ b/viz/ts/svg/thinkChart/Math/Layout/Weights.ts
@@ -0,0 +1,27 @@
+namespace Layout {
+
+ export class Weights {
+
+ /**
+ * leader line length
+ */
+ public len: number = 0.2;
+ /**
+ * label-label overlap
+ */
+ public inter: number = 1.0;
+ /**
+ * label-label overlap
+ */
+ public lab2: number = 30.0;
+ /**
+ * label-anchor overlap
+ */
+ public lab_anc: number = 30.0;
+ /**
+ * orientation bias
+ */
+ public orient: number = 3.0;
+
+ }
+}
\ No newline at end of file
diff --git a/viz/ts/svg/thinkChart/thinkChart.njsproj b/viz/ts/svg/thinkChart/thinkChart.njsproj
index 4729ece..7b2bef0 100644
--- a/viz/ts/svg/thinkChart/thinkChart.njsproj
+++ b/viz/ts/svg/thinkChart/thinkChart.njsproj
@@ -46,6 +46,15 @@
Code
+
+ Code
+
+
+ Code
+
+
+ Code
+