Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Commit

Permalink
Small bug fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Mihai Budiu <[email protected]>
  • Loading branch information
Mihai Budiu committed Apr 5, 2022
1 parent 8a2b1c6 commit 8432b6a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
5 changes: 4 additions & 1 deletion bin/upload-data.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,12 @@ def main():
" (if relative it is with respect to config.service_folder)")
parser.add_argument("-L", "--symlinks", help="Follow symlinks instead of ignoring them",
action="store_true")
parser.add_argument("--common", "-s", help="File that is loaded to all machines", action="append")
parser.add_argument("-s", "--common", help="File that is loaded to all machines", action="append")
parser.add_argument("files", help="Files to copy", nargs=REMAINDER)
args = parser.parse_args()
if args.common is None:
# Why is this happening?
args.common = []
config = get_config(parser, args)
folder = args.directory
if folder is None:
Expand Down
Empty file modified data/utf16-data.csv
100755 → 100644
Empty file.
7 changes: 7 additions & 0 deletions platform/src/main/java/org/hillview/main/DemoDataCleaner.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Comparator;
import java.util.HashMap;
import java.util.stream.Stream;

/**
Expand Down Expand Up @@ -69,6 +70,12 @@ public static void main(String[] args) throws IOException {
ITable tbl = r.load();
assert tbl != null;
ITable p = tbl.project(schema);
if (p.getSchema().containsColumnName("Reporting_Airline")) {
// The schema has changed at some point
HashMap<String, String> h = new HashMap<>();
h.put("Reporting_Airline", "UniqueCarrier");
p = p.renameColumns(h);
}

String end = filename.replace(prefix, "");
if (end.endsWith(".gz"))
Expand Down
9 changes: 5 additions & 4 deletions web/src/main/webapp/dataViews/axisData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ export class AxisData {
}
// on vertical axis the direction is swapped
const domain = bottom ? [actualMin, actualMax] : [actualMax, actualMin];
let rotate = AxisDescription.fontSize > 10;

switch (this.description.kind) {
case "Integer":
Expand All @@ -296,7 +297,7 @@ export class AxisData {
this.scale = d3scaleLinear()
.domain(domain)
.range([0, pixels]);
this.axis = new AxisDescription(axisCreator(this.scale), 1, false, null);
this.axis = new AxisDescription(axisCreator(this.scale), 1, rotate, null);
break;
}
case "Json":
Expand All @@ -321,7 +322,7 @@ export class AxisData {
const maxLabelWidthInChars = Math.floor(
bottom ? maxLabelWidthInPixels / fontWidth : labelRoom / fontWidth);
console.assert(maxLabelWidthInChars > 2);
let rotate = false;
rotate = false;

for (let i = 0; i < tickCount; i++) {
ticks.push((i + adjust) * tickSpan);
Expand Down Expand Up @@ -361,7 +362,7 @@ export class AxisData {
this.scale = d3scaleTime()
.domain([minDate, maxDate])
.range([0, pixels]);
this.axis = new AxisDescription(axisCreator(this.scale), 1, false, null);
this.axis = new AxisDescription(axisCreator(this.scale), 1, rotate, null);
break;
}
case "Date": {
Expand All @@ -370,7 +371,7 @@ export class AxisData {
this.scale = d3scaleTime()
.domain([minDate, maxDate])
.range([0, pixels]);
this.axis = new AxisDescription(axisCreator(this.scale), 1, false, null);
this.axis = new AxisDescription(axisCreator(this.scale), 1, rotate, null);
break;
}
case "None":
Expand Down
2 changes: 1 addition & 1 deletion web/src/main/webapp/loadView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export class LoadView extends RemoteObject implements IDataView {
action: () => this.purgeAll(),
help: "Purge all data from memory (memoized, root, leaf)"
}, {
text: "Toggle privat heatmap threshold",
text: "Toggle private heatmap threshold",
action: () => {
HeatmapPlot.useConfThreshold = !HeatmapPlot.useConfThreshold;
this.page.reportError("Use threshold is " + HeatmapPlot.useConfThreshold);
Expand Down

0 comments on commit 8432b6a

Please sign in to comment.