Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
c88bd24
spelling: align
jsoref Oct 2, 2022
62ebbdb
spelling: alignment
jsoref Oct 2, 2022
5809aaf
spelling: assume
jsoref Oct 2, 2022
97ff00b
spelling: attribute
jsoref Oct 2, 2022
b2d5c07
spelling: attributes
jsoref Oct 2, 2022
8943aef
spelling: available
jsoref Oct 2, 2022
5c8e744
spelling: background
jsoref Oct 2, 2022
64b9fa7
spelling: bracket
jsoref Oct 2, 2022
52bb551
spelling: can
jsoref Oct 2, 2022
c50ae23
spelling: charticulator
jsoref Oct 2, 2022
8f8805e
spelling: classes
jsoref Oct 2, 2022
2e78c8a
spelling: collapse
jsoref Oct 2, 2022
7b73061
spelling: column
jsoref Oct 2, 2022
2caee9c
spelling: columns
jsoref Oct 2, 2022
8a85f1d
spelling: components
jsoref Oct 2, 2022
465aef2
spelling: configuration
jsoref Oct 2, 2022
3119966
spelling: constraints
jsoref Oct 2, 2022
93e64d7
spelling: contains
jsoref Oct 2, 2022
a63591f
spelling: conversion
jsoref Oct 2, 2022
114a67f
spelling: coordinate
jsoref Oct 2, 2022
8824608
spelling: coordinator
jsoref Oct 2, 2022
bacd70a
spelling: count
jsoref Oct 2, 2022
890170c
spelling: curve
jsoref Oct 2, 2022
8faec8f
spelling: dataset
jsoref Oct 2, 2022
c38eba6
spelling: decimal
jsoref Oct 2, 2022
2e36077
spelling: default
jsoref Oct 2, 2022
f952a91
spelling: delimiter
jsoref Oct 2, 2022
1cbc1bc
spelling: description
jsoref Oct 2, 2022
b4176dc
spelling: design
jsoref Oct 2, 2022
b267542
spelling: different
jsoref Oct 2, 2022
f510030
spelling: element
jsoref Oct 2, 2022
2c73a27
spelling: ellipse
jsoref Oct 2, 2022
e62aa11
spelling: emphasized
jsoref Oct 2, 2022
db2fe3c
spelling: enforces
jsoref Oct 2, 2022
6240eec
spelling: example
jsoref Oct 2, 2022
1786980
spelling: expressions
jsoref Oct 2, 2022
23ec3a0
spelling: fields
jsoref Oct 2, 2022
57f2a3f
spelling: format
jsoref Oct 2, 2022
8878089
spelling: glyph
jsoref Oct 2, 2022
1fb5a07
spelling: gridline
jsoref Oct 2, 2022
dcec8bc
spelling: group
jsoref Oct 2, 2022
3d8f93d
spelling: grouping
jsoref Oct 2, 2022
6ca5cfe
spelling: hashes
jsoref Oct 2, 2022
1dbacef
spelling: initialize
jsoref Oct 2, 2022
94c7362
spelling: iterator
jsoref Oct 2, 2022
6690c13
spelling: label
jsoref Oct 2, 2022
482a312
spelling: lagrange
jsoref Oct 2, 2022
e6d8450
spelling: length
jsoref Oct 2, 2022
6c305d9
spelling: loading
jsoref Oct 2, 2022
7fb4124
spelling: localization
jsoref Oct 2, 2022
32a14f4
spelling: manager
jsoref Oct 2, 2022
a448c0c
spelling: map
jsoref Oct 2, 2022
f3dfed2
spelling: message
jsoref Oct 2, 2022
f9b86ed
spelling: object
jsoref Oct 2, 2022
0f26eda
spelling: objects
jsoref Oct 2, 2022
13ccf8a
spelling: parsed
jsoref Oct 2, 2022
273a59b
spelling: priority
jsoref Oct 2, 2022
7d1223a
spelling: properties
jsoref Oct 2, 2022
bfd3a7b
spelling: providers
jsoref Oct 2, 2022
d8ed3e7
spelling: ratio
jsoref Oct 2, 2022
2fbc1ef
spelling: rectangle
jsoref Oct 2, 2022
bd7bf51
spelling: removal
jsoref Oct 2, 2022
74686b2
spelling: response
jsoref Oct 2, 2022
21d8d90
spelling: returns
jsoref Oct 2, 2022
a052081
spelling: right
jsoref Oct 2, 2022
71bfba1
spelling: segment
jsoref Oct 2, 2022
7247cf2
spelling: spiral
jsoref Oct 2, 2022
a25a4bc
spelling: stringify
jsoref Oct 2, 2022
350ae23
spelling: structures
jsoref Oct 2, 2022
45e49bc
spelling: subtitle
jsoref Oct 2, 2022
d2f47a4
spelling: template
jsoref Oct 2, 2022
e4370de
spelling: than
jsoref Oct 2, 2022
539fce6
spelling: undefined
jsoref Oct 2, 2022
30fbe86
spelling: updates
jsoref Oct 2, 2022
b5372d9
spelling: value
jsoref Oct 2, 2022
6356065
spelling: values
jsoref Oct 2, 2022
1067327
spelling: variable
jsoref Oct 2, 2022
5c550bf
spelling: visible
jsoref Oct 2, 2022
c5d03bd
spelling: work
jsoref Oct 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ You can add custom sample datasets that can be used with Charticulator. To do s
[
{
"name": "<Your dataset display name>",
"description": "<Your dataset desription>",
"description": "<Your dataset description>",
"tables": [
{
"name": "<Your dataset file name without extension>",
Expand Down Expand Up @@ -128,6 +128,6 @@ contact [[email protected]](mailto:[email protected]) with any additio
# Documentation

Run `yarn typedoc` to generate documentation pages.
The page will be awailable in [`./docs/charticulator`](./docs/charticulator/index.html)
The page will be available in [`./docs/charticulator`](./docs/charticulator/index.html)

Start point of documentation is index page {@link "index"}
8 changes: 4 additions & 4 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
<script src="scripts/app.bundle.js"></script>

<script type="text/javascript">
const responce = fetch(`${CHARTICULATOR_CONFIG.WorkerURL}`).then(
(responce) => {
if (!responce.ok) {
const response = fetch(`${CHARTICULATOR_CONFIG.WorkerURL}`).then(
(response) => {
if (!response.ok) {
throw Error(
`Loading worker script from ${
CHARTICULATOR_CONFIG.WorkerURL
} failed`
);
}
const script = responce.text().then((script) => {
const script = response.text().then((script) => {
const blob = new Blob([script], { type: "application/javascript" });

const workerScript = URL.createObjectURL(blob);
Expand Down
2 changes: 1 addition & 1 deletion sass/components/canvas/attribute_editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@
background: lighten($color-active, 30%);
height: 26px;

&-attrubutes {
&-attributes {
@extend .el-drag-over;
width: auto;
}
Expand Down
6 changes: 3 additions & 3 deletions src/app/actions/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export class ReplaceDataset extends Action {
}
}

/** Invokes updaes all plot segments on the chart, */
/** Invokes updates all plot segments on the chart, */
export class UpdatePlotSegments extends Action {
constructor() {
super();
Expand Down Expand Up @@ -283,7 +283,7 @@ export class RemoveMarkFromGlyph extends Action {
}

/**
* Dispatches when user binds table coulmns to attributes
* Dispatches when user binds table columns to attributes
*/
export class MapDataToMarkAttribute extends Action {
/**
Expand Down Expand Up @@ -530,7 +530,7 @@ export class MapDataToChartElementAttribute extends Action {

public digest() {
return {
name: "MapChartElementkAttribute",
name: "MapChartElementAttribute",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible this is important...

chartElement: objectDigest(this.chartElement),
attribute: this.attribute,
attributeType: this.attributeType,
Expand Down
18 changes: 9 additions & 9 deletions src/app/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import { EditorType } from "./stores/app_store";
import { LocalizationConfig } from "../container/container";

export class ApplicationExtensionContext implements ExtensionContext {
constructor(public app: Application) {}
constructor(public app: Application) { }
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't do this. But I apparently opened this file in VSCode and some reformatting rule apparently insisted (it also rewrote my workflow yaml).

I'm willing to drop these changes, but do note that files should not trip up drive-by-contributors which means someone should really clean up the codebase so this doesn't happen when the next person drives by.


public getGlobalDispatcher(): Dispatcher<Action> {
return this.app.appStore.dispatcher;
Expand Down Expand Up @@ -125,7 +125,7 @@ export class Application {
workerScriptContent?: string;
worker?: CharticulatorWorkerInterface;
},
localizaiton: LocalizationConfig,
localization: LocalizationConfig,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible this is a public api. I hope it isn't...

handlers?: {
menuBarHandlers?: MenuBarHandlers;
telemetry?: TelemetryRecorder;
Expand Down Expand Up @@ -175,7 +175,7 @@ export class Application {
);
const DelimiterSymbol = parseSafe(
window.localStorage.getItem(LocalStorageKeys.DelimiterSymbol) ||
defaultDelimiter,
defaultDelimiter,
defaultDelimiter
);
const GroupSymbol = parseSafe(
Expand All @@ -184,7 +184,7 @@ export class Application {
);
const NumberFormatRemove = parseSafe(
window.localStorage.getItem(LocalStorageKeys.NumberFormatRemove) ||
defaultNumberFormat.remove,
defaultNumberFormat.remove,
defaultNumberFormat.remove
);

Expand All @@ -205,13 +205,13 @@ export class Application {
});
} catch (ex) {
setFormatOptions({
currency: [localizaiton?.currency, ""] ?? defaultCurrency,
currency: [localization?.currency, ""] ?? defaultCurrency,
grouping: defaultDigitsGroup,
decimal: localizaiton?.decemalDelimiter ?? defaultNumberFormat.decimal,
decimal: localization?.decimalDelimiter ?? defaultNumberFormat.decimal,
thousands:
localizaiton?.thousandsDelimiter ?? defaultNumberFormat.decimal,
localization?.thousandsDelimiter ?? defaultNumberFormat.decimal,
});
console.warn("Loadin localization settings failed");
console.warn("Loading localization settings failed");
}

(window as any).mainStore = this.appStore;
Expand Down Expand Up @@ -283,7 +283,7 @@ export class Application {
deepClone(info.specification)
);

// if version wasn't saved in tempalte we asume it is 2.0.3
// if version wasn't saved in template we assume it is 2.0.3
if (info.template && info.template.version == undefined) {
info.template.version = defaultVersionOfTemplate;
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/colors/color_space_select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import * as React from "react";
import { ComboBox, IComboBoxOption } from "@fluentui/react";
import { defultComponentsHeight } from "../../views/panels/widgets/controls/fluentui_customized_components";
import { defaultComponentsHeight } from "../../views/panels/widgets/controls/fluentui_customized_components";
import { Color } from "../../../core";
import {
ColorSpaceDescription,
Expand Down Expand Up @@ -47,7 +47,7 @@ export class ColorSpaceSelect extends React.Component<
}}
styles={{
root: {
...defultComponentsHeight,
...defaultComponentsHeight,
},
input: {
width: "100px !important",
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/error_boundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { copyToClipboard } from "../utils";

export enum TelemetryActionType {
Exception = "exception",
ExportTemplate = "exportTempalte",
ExportTemplate = "exportTemplate",
}

export interface TelemetryRecorder {
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ export * from "./gradient_picker";
export * from "./minimizable_panel";
export * from "./error_boundary";
export * from "./editable_text_view";
export * from "./messsage_box";
export * from "./message_box";
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File renamed below

4 changes: 2 additions & 2 deletions src/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
*
* * {@link "app/backend/indexed_db"} contains class {@link IndexedDBBackend}. It wraps [IndexedDB API](https://developer.mozilla.org/docs/Web/API/IndexedDB_API) to save user charts in the browser storage.
*
* * {@link "app/components/index"} contains general high-level componenets for UI. Other low-level components ("bricks" of UI) are in {@link "app/views/index"} module.
* * {@link "app/components/index"} contains general high-level components for UI. Other low-level components ("bricks" of UI) are in {@link "app/views/index"} module.
*
* Charticulator has {@link WidgetManager} class for managing those components. It's "facade" over all components.
*
* {@link ObjectClass.getAttributePanelWidgets} method uses interface of {@link WidgetManager} to build UI for mark attributes. (See {@link "core/prototypes/marks/index"})
*
* * {@link "app/views/index"} module contains general views for dataset displaying, file views for open, save, create chart and different panes like attribure panel link creator, object list editor, scale editor, scale panel with used scales list.
* * {@link "app/views/index"} module contains general views for dataset displaying, file views for open, save, create chart and different panes like attribute panel link creator, object list editor, scale editor, scale panel with used scales list.
*
* * {@link "app/views/dataset/table_view"} contains view for displaying dataset as table on creating the new chart or for displaying data samples after importing data
*
Expand Down
2 changes: 1 addition & 1 deletion src/app/renderer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export function applyColorFilter(color: Color, colorFilter: ColorFilter) {
}

/**
* Coverts {@Color} to `rgb(r,g,b)` string. Or coverts `#RRGGBB` fromat to `rgb(r,g,b)`}
* Coverts {@Color} to `rgb(r,g,b)` string. Or coverts `#RRGGBB` format to `rgb(r,g,b)`}
* @param color {@Color} object or color string in HEX format (`#RRGGBB`)
*/
export function renderColor(
Expand Down
8 changes: 4 additions & 4 deletions src/app/stores/app_store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ export class AppStore extends BaseStore {
this.chartManager?.resetDifference();
}

// removes unused scale objecs
// removes unused scale objects
private updateChartState() {
function hasMappedProperty(
mappings: Specification.Mappings,
Expand Down Expand Up @@ -2105,9 +2105,9 @@ export class AppStore extends BaseStore {
}

/**
* Due to undefined "value" will not saved after JSON.stringfy, need to update all undefined "values" to null
* deepClone uses JSON.stringfy to create copy of object. If object losses some property after copy
* the function expect_deep_approximately_equals gives difference for identical tempalte/chart state
* Due to undefined "value" will not saved after JSON.stringify, need to update all undefined "values" to null
* deepClone uses JSON.stringify to create copy of object. If object losses some property after copy
* the function expect_deep_approximately_equals gives difference for identical template/chart state
* See {@link ChartStateManager.hasUnsavedChanges} for details
* @param dataExpression Data expression for axis
*/
Expand Down
2 changes: 1 addition & 1 deletion src/app/stores/migrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export class Migrator {
}

/**
* Adds enableTooltips, enableSelection, enableContextMenu properties with default balue true
* Adds enableTooltips, enableSelection, enableContextMenu properties with default value true
* @param state current state
*/
public addInteractivityProperties(state: AppStoreState) {
Expand Down
4 changes: 2 additions & 2 deletions src/app/template/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* The {@link ChartTemplateBuilder} creates tempate ({@link ChartTemplate}) from the current chart.
* The {@link ChartTemplateBuilder} creates template ({@link ChartTemplate}) from the current chart.
* {@link ChartTemplate} contains simplified version of {@link Chart} object in {@link ChartTemplate.specification} property.
* Tempate can be exported as *.tmplt file (JSON format). It also uses on export to HTML file or on export as Power BI visual.
* Template can be exported as *.tmplt file (JSON format). It also uses on export to HTML file or on export as Power BI visual.
*
* Template can be loaded into container outside of Charticulator app to visualize with custom dataset.
*
Expand Down
12 changes: 6 additions & 6 deletions src/app/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export function stringToDataURL(mimeType: string, content: string) {
return "data:" + mimeType + ";base64," + b64EncodeUnicode(content);
}

function checkConvertion(
function checkConversion(
type: DataType,
dataSample: (string | boolean | Date | number)[]
) {
Expand Down Expand Up @@ -303,7 +303,7 @@ export function getConvertableTypes(
return true;
}
if (dataSample) {
return checkConvertion(
return checkConversion(
t,
dataSample.map((d) => d && d.toString())
);
Expand Down Expand Up @@ -356,11 +356,11 @@ export function convertColumns(
applyConvertedValues(table, column.name, convertedValues);
return null;
} catch (ex) {
const messgae = `Converting column type from ${originColumn.type} to ${type} failed`;
console.warn(messgae);
const message = `Converting column type from ${originColumn.type} to ${type} failed`;
console.warn(message);
// rollback type
column.type = typeBeforeChange;
return messgae;
return message;
}
}

Expand All @@ -381,7 +381,7 @@ export function isInIFrame() {
}
}

export function getAligntment(anchor: Element) {
export function getAlignment(anchor: Element) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible this is an api

let alignX:
| "start-outer"
| "inner"
Expand Down
2 changes: 1 addition & 1 deletion src/app/views/canvas/handles/input_curve.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export class InputCurveHandleView extends React.Component<
text={strings.handles.drawSpiral}
onClick={() => {
context.close();
// Make sprial and emit.
// Make spiral and emit.
const dragContext = new HandlesDragContext();
const curve: Point[][] = [];
this.props.onDragStart(
Expand Down
8 changes: 4 additions & 4 deletions src/app/views/canvas/snapping/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class SnappingSession<ElementType> {
}
}

private giveProrityToPoint(
private givePriorityToPoint(
a: SnappableGuide<ElementType>,
b: SnappableGuide<ElementType>
) {
Expand Down Expand Up @@ -88,7 +88,7 @@ export class SnappingSession<ElementType> {
let minXDistance: number = null;
let minYGuide: SnappableGuide<ElementType> = null;
let minYDistance: number = null;
for (const g of this.candidates.sort(this.giveProrityToPoint)) {
for (const g of this.candidates.sort(this.givePriorityToPoint)) {
const guide = g.guide as Prototypes.SnappingGuides.Axis;
if (this.findClosestSnappingGuide) {
if (guide.type == "y") {
Expand Down Expand Up @@ -142,7 +142,7 @@ export class SnappingSession<ElementType> {
let minXDistance: number = null;
let minYGuide: SnappableGuide<ElementType> = null;
let minYDistance: number = null;
for (const g of this.candidates.sort(this.giveProrityToPoint)) {
for (const g of this.candidates.sort(this.givePriorityToPoint)) {
const guide = g.guide as Prototypes.SnappingGuides.Axis;
if (this.findClosestSnappingGuide) {
// Find closest point
Expand Down Expand Up @@ -280,7 +280,7 @@ export class SnappingSession<ElementType> {
}
if (source == "x" || source == "y") {
for (const candidate of this.currentCandidates.sort(
this.giveProrityToPoint
this.givePriorityToPoint
)) {
if (
(candidate.guide as Prototypes.SnappingGuides.PolarAxis)
Expand Down
16 changes: 8 additions & 8 deletions src/app/views/dataset/data_field_binding_builder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import { AggregationFunctionDescription } from "../../../core/expression";
import {
defaultLabelStyle,
defaultStyle,
defultBindButtonSize,
defaultBindButtonSize,
FluentDataBindingMenuItem,
FluentDataBindingMenuLabel,
} from "../panels/widgets/controls/fluentui_customized_components";
Expand Down Expand Up @@ -85,7 +85,7 @@ interface Builder {
/**
* Add default value
*/
produceDefaultValue(dafaultValue: IDefaultValue): void;
produceDefaultValue(defaultValue: IDefaultValue): void;

getMenuItems(): IContextualMenuItem[];

Expand Down Expand Up @@ -149,7 +149,7 @@ class MenuItemsCreator {
}
}

public setFieds(
public setFields(
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...

datasetStore: AppStore,
table?: string,
kinds?: Dataset.DataKind[],
Expand Down Expand Up @@ -736,11 +736,11 @@ export class MenuItemBuilder implements Builder {
kinds?: Dataset.DataKind[],
types?: Dataset.DataType[]
): void {
this.menuItemsCreator.setFieds(datasetStore, table, kinds, types);
this.menuItemsCreator.setFields(datasetStore, table, kinds, types);
}

public produceDefaultValue(dafaultValue: IDefaultValue): void {
this.menuItemsCreator.produceDefaultValue(dafaultValue);
public produceDefaultValue(defaultValue: IDefaultValue): void {
this.menuItemsCreator.produceDefaultValue(defaultValue);
}

public buildMenu(): void {
Expand Down Expand Up @@ -845,12 +845,12 @@ export class Director {
...(defaultStyle as any),
title: {
...defaultStyle.title,
lineHeight: defultBindButtonSize.height,
lineHeight: defaultBindButtonSize.height,
borderWidth: "0px",
},
dropdownOptionText: {
boxSizing: "unset",
lineHeight: defultBindButtonSize.height,
lineHeight: defaultBindButtonSize.height,
},
callout: {
minWidth: 180,
Expand Down
Loading