├── .gitignore
├── LICENSE
├── README.md
├── bin
├── build.sh
├── bundle.sh
├── common.flags
├── css.sh
└── solution.sh
├── css
├── button.less
├── chartEditor.freeboard.less
├── chartEditor.less
├── chartEditor.qlik.less
├── chartEditor.tableau.less
├── checkbox.less
├── colormenubutton.less
├── combobox.less
├── common.less
├── dialog.less
├── dialog.qlik.less
├── dialog.tableau.less
├── menu.less
├── menubutton.less
├── mixins.less
├── variables.freeboard.less
├── variables.less
├── variables.qlik.less
└── variables.tableau.less
├── dist
├── anychart-editor.css
├── anychart-editor.min.css
├── anychart-editor.min.js
├── index.html
└── index.js
├── editor.js
├── index.html
├── index.js
├── package-lock.json
├── package.json
└── src
├── basicEditor.js
├── binding.js
├── bundleEditor.js
├── chartEditor.js
├── editor
├── Base.js
├── Chart.js
├── Gantt.js
├── Map.js
├── Stock.js
└── bundle.js
├── enums.js
├── events.js
├── ganttEditor.js
├── mapEditor.js
├── model
├── Base.js
├── Chart.js
├── Gantt.js
├── Map.js
└── Stock.js
├── reporting.js
├── stockEditor.js
├── ui
├── Chart.js
├── Component.js
├── ComponentWithKey.js
├── Panel.js
├── PanelIndexed.js
├── PanelZippy.js
├── PanelsGroup.js
├── Preloader.js
├── Tabs.js
├── appearanceTab
│ ├── ChartLabels.js
│ ├── ChartSpecific.js
│ ├── ChartTitle.js
│ ├── CircularRanges.js
│ ├── ColorRange.js
│ ├── ColorScale.js
│ ├── Data.js
│ ├── DataLabels.js
│ ├── DropOff.js
│ ├── Flow.js
│ ├── GanttDataGrid.js
│ ├── GanttGridColoring.js
│ ├── GanttTimeLine.js
│ ├── GanttTimeLineHeader.js
│ ├── GanttTooltip.js
│ ├── GeneralTheming.js
│ ├── Grids.js
│ ├── Legend.js
│ ├── Node.js
│ ├── Pointers.js
│ ├── Quarters.js
│ ├── ScaleBars.js
│ ├── Scales.js
│ ├── SeriesWithScales.js
│ ├── StockSeries.js
│ ├── Tabs.js
│ ├── Tooltip.js
│ └── axes
│ │ ├── Cartesian.js
│ │ ├── CartesianXAxes.js
│ │ ├── CartesianYAxes.js
│ │ ├── GaugeAxes.js
│ │ ├── RadarPolar.js
│ │ ├── RadarPolarXAxis.js
│ │ └── RadarPolarYAxis.js
├── breadcrumbs
│ ├── Breadcrumbs.js
│ └── Item.js
├── control
│ ├── Menu.js
│ ├── button
│ │ ├── Base.js
│ │ ├── Bold.js
│ │ ├── Italic.js
│ │ ├── Toggle.js
│ │ └── Underline.js
│ ├── checkbox
│ │ ├── AdjustFontSize.js
│ │ ├── Base.js
│ │ └── Renderer.js
│ ├── colorPicker
│ │ ├── Base.js
│ │ └── Renderer.js
│ ├── comboBox
│ │ ├── Base.js
│ │ ├── PercentToRatio.js
│ │ └── Percentage.js
│ ├── fieldSelect
│ │ ├── Base.js
│ │ ├── MenuCaption.js
│ │ ├── MenuItem.js
│ │ ├── Select.js
│ │ └── Theme.js
│ ├── input
│ │ ├── Base.js
│ │ ├── Numbers.js
│ │ ├── Palette.js
│ │ └── StringArray.js
│ ├── select
│ │ ├── Base.js
│ │ ├── DataType.js
│ │ ├── FontFamily.js
│ │ ├── Palettes.js
│ │ ├── ScaleType.js
│ │ └── Scales.js
│ └── wrapped
│ │ ├── Base.js
│ │ ├── Labeled.js
│ │ ├── LabeledTwins.js
│ │ └── SeriesName.js
├── dataSets
│ ├── DataSet.js
│ ├── DataSetPreview.js
│ ├── Intro.js
│ ├── Widget.js
│ ├── WidgetPreview.js
│ └── edit
│ │ ├── ColumnsController.js
│ │ ├── Input.js
│ │ └── Table.js
├── dataSettings
│ ├── GeoDataInputs.js
│ ├── Plot.js
│ ├── Series.js
│ ├── Widget.js
│ └── chartTypeSelect
│ │ ├── Filters.js
│ │ ├── Menu.js
│ │ ├── MenuItem.js
│ │ ├── Pages.js
│ │ └── Widget.js
├── dialog
│ ├── Base.js
│ ├── Confirm.js
│ ├── Data.js
│ ├── DataPreview.js
│ ├── PresetPreview.js
│ ├── Sample.js
│ └── Settings.js
├── exportTabs
│ ├── Embed.js
│ ├── Json.js
│ ├── Scripts.js
│ ├── SourceCode.js
│ └── Tabs.js
├── panel
│ ├── Background.js
│ ├── Cap.js
│ ├── ChartLabel.js
│ ├── CircularRange.js
│ ├── Error.js
│ ├── Font.js
│ ├── Grid.js
│ ├── Labels.js
│ ├── Legend.js
│ ├── Markers.js
│ ├── PlotGrids.js
│ ├── Quarter.js
│ ├── QuarterLabel.js
│ ├── ScaleBar.js
│ ├── Stagger.js
│ ├── Stroke.js
│ ├── Ticks.js
│ ├── Title.js
│ ├── Tooltip.js
│ ├── TooltipTitle.js
│ ├── TreemapHeaders.js
│ ├── axes
│ │ ├── Cartesian.js
│ │ ├── CircularGauge.js
│ │ ├── Linear.js
│ │ ├── LinearGauge.js
│ │ ├── Polar.js
│ │ ├── Radar.js
│ │ └── Radial.js
│ ├── ganttProject
│ │ ├── Buttons.js
│ │ ├── Coloring.js
│ │ ├── Column.js
│ │ ├── DataGrid.js
│ │ ├── LevelWrapper.js
│ │ ├── Tooltip.js
│ │ └── elements
│ │ │ ├── Base.js
│ │ │ └── Connectors.js
│ ├── pointers
│ │ ├── Bar.js
│ │ ├── CircularBase.js
│ │ ├── Knob.js
│ │ ├── Led.js
│ │ ├── LinearBase.js
│ │ ├── LinearMarker.js
│ │ ├── Marker.js
│ │ ├── Needle.js
│ │ ├── RangeBar.js
│ │ ├── Tank.js
│ │ └── Thermometer.js
│ ├── scales
│ │ ├── Base.js
│ │ ├── DateTime.js
│ │ ├── DateTimeTicks.js
│ │ ├── Linear.js
│ │ ├── LinearColor.js
│ │ ├── Logarithmic.js
│ │ ├── Ordinal.js
│ │ ├── OrdinalColor.js
│ │ ├── OrdinalTicks.js
│ │ ├── Ranges.js
│ │ ├── ScalePanel.js
│ │ ├── ScatterTicks.js
│ │ └── Standalone.js
│ ├── series
│ │ ├── SeriesWithScales.js
│ │ └── StockSeries.js
│ └── specific
│ │ ├── Cartesian.js
│ │ ├── GaugeCircular.js
│ │ ├── GaugeLinear.js
│ │ ├── HeatMap.js
│ │ ├── Mekko.js
│ │ ├── Pie.js
│ │ ├── Polar.js
│ │ ├── Quadrant.js
│ │ ├── Radar.js
│ │ ├── Sankey.js
│ │ ├── Scatter.js
│ │ ├── TagCloud.js
│ │ ├── TreeMap.js
│ │ └── Waterfall.js
├── presets
│ ├── Preset.js
│ └── Widget.js
├── steps
│ ├── Export.js
│ ├── PrepareData.js
│ ├── SetupChart.js
│ ├── Step.js
│ ├── VisualAppearance.js
│ └── Widget.js
└── userData
│ └── Widget.js
└── utils.js
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | out/*
3 | node_modules/
4 | demos-local
5 | tmp
6 | *___jb_old___
7 | .DS_Store
8 | tmp
9 | tests
--------------------------------------------------------------------------------
/bin/build.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 |
4 |
5 | if [ -z $1 ] || [ $1 = "css" ]
6 | then
7 | echo 'Start building CSS.'
8 | sh ./bin/css.sh
9 | sh ./bin/css.sh qlik
10 | sh ./bin/css.sh tableau
11 | sh ./bin/css.sh freeboard
12 | echo 'Finish building CSS.'
13 | fi
14 |
15 | if [ -z $1 ] || [ $1 = "deps" ]
16 | then
17 | echo 'Start building deps.'
18 | python node_modules/google-closure-library/closure/bin/build/depswriter.py \
19 | --root_with_prefix="src ../../../../src" \
20 | --output_file="out/deps.js"
21 | echo 'Finish building deps.'
22 | fi
23 |
24 |
--------------------------------------------------------------------------------
/bin/bundle.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | echo 'Start building bundle.'
4 |
5 | if [ -z $1 ]
6 | then
7 | sh ./bin/solution.sh
8 | else
9 | if [ $1 == 'all' ]
10 | then
11 | sh ./bin/solution.sh
12 | sh ./bin/solution.sh qlik
13 | sh ./bin/solution.sh tableau
14 | sh ./bin/solution.sh freeboard
15 | else
16 | sh ./bin/solution.sh $1
17 | fi
18 | fi
19 |
20 | echo 'Bundle build done!'
--------------------------------------------------------------------------------
/bin/common.flags:
--------------------------------------------------------------------------------
1 | --charset UTF-8
2 |
3 | --process_closure_primitives
4 |
5 | --compilation_level=ADVANCED_OPTIMIZATIONS
6 |
7 | --dependency_mode STRICT
8 |
9 | --language_in ECMASCRIPT3
10 | --language_out ECMASCRIPT3
11 |
12 | --extra_annotation_name "includeDoc"
13 | --extra_annotation_name "illustration"
14 | --extra_annotation_name "illustrationDesc"
15 | --extra_annotation_name "ignoreDoc"
16 | --extra_annotation_name "propertyDoc"
17 | --extra_annotation_name "shortDescription"
18 |
19 | --isolation_mode IIFE
20 |
21 | --use_types_for_optimization true
22 |
23 | --warning_level VERBOSE
24 |
25 | --jscomp_warning accessControls
26 | --jscomp_warning ambiguousFunctionDecl
27 | --jscomp_warning checkDebuggerStatement
28 | --jscomp_warning checkEventfulObjectDisposal
29 | --jscomp_warning checkRegExp
30 | --jscomp_warning checkTypes
31 | --jscomp_warning checkVars
32 | --jscomp_warning closureDepMethodUsageChecks
33 | --jscomp_warning conformanceViolations
34 | --jscomp_warning const
35 | --jscomp_warning constantProperty
36 | --jscomp_warning es3
37 | --jscomp_warning es5Strict
38 | --jscomp_warning externsValidation
39 | --jscomp_off extraRequire
40 | --jscomp_warning fileoverviewTags
41 | --jscomp_warning functionParams
42 | --jscomp_warning globalThis
43 | --jscomp_warning internetExplorerChecks
44 | --jscomp_warning invalidCasts
45 | --jscomp_warning misplacedTypeAnnotation
46 | --jscomp_warning missingGetCssName
47 | --jscomp_off missingOverride
48 | --jscomp_warning missingPolyfill
49 | --jscomp_warning missingProperties
50 | --jscomp_warning missingProvide
51 | --jscomp_warning missingRequire
52 | --jscomp_warning missingReturn
53 | --jscomp_warning msgDescriptions
54 | --jscomp_off newCheckTypes
55 | --jscomp_off newCheckTypesExtraChecks
56 | --jscomp_off nonStandardJsDocs
57 | --jscomp_off reportUnknownTypes
58 | --jscomp_warning suspiciousCode
59 | --jscomp_warning strictModuleDepCheck
60 | --jscomp_warning typeInvalidation
61 | --jscomp_warning undefinedNames
62 | --jscomp_warning undefinedVars
63 | --jscomp_warning unknownDefines
64 | --jscomp_off unusedLocalVariables
65 | --jscomp_off unusedPrivateMembers
66 | --jscomp_warning uselessCode
67 | --jscomp_off useOfGoogBase
68 | --jscomp_warning underscore
69 | --jscomp_warning visibility
70 | --jscomp_warning lintChecks
71 |
72 | --hide_warnings_for "node_modules/google-closure-library"
--------------------------------------------------------------------------------
/bin/css.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | if [ -z $1 ]
4 | then
5 | echo " Compiling vanilla chart editor CSS."
6 | LOCATION="out/anychart-editor.min.css"
7 | else
8 | echo " Compiling chart editor CSS for $1."
9 | LOCATION="out/$1/anychart-editor.min.css"
10 | fi
11 |
12 | if [ -z $1 ]
13 | then
14 | lessc css/chartEditor.less out/anychart-editor.css
15 | lessc css/chartEditor.less "$LOCATION" --clean-css="--s1 --advanced --compatibility=ie8"
16 | echo " Compilation of vanilla chart editor CSS complete: $LOCATION"
17 | else
18 | lessc css/chartEditor."$1".less out/"$1"/anychart-editor.css
19 | lessc css/chartEditor."$1".less "$LOCATION" --clean-css="--s1 --advanced --compatibility=ie8"
20 | echo " Compilation of chart editor CSS for $1 complete: $LOCATION"
21 | fi
--------------------------------------------------------------------------------
/bin/solution.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | if [ -z $1 ]
4 | then
5 | echo " Compiling vanilla chart editor."
6 | LOCATION="out/anychart-editor.min.js"
7 | else
8 | echo " Compiling chart editor for $1."
9 | LOCATION="out/$1/anychart-editor.min.js"
10 | fi
11 |
12 | PACKAGE_VERSION=$(cat package.json \
13 | | grep version \
14 | | head -1 \
15 | | awk -F: '{ print $2 }' \
16 | | sed 's/[",]//g' \
17 | | tr -d '[[:space:]]')
18 |
19 | java -jar node_modules/google-closure-compiler/compiler.jar \
20 | --js_output_file="$LOCATION" \
21 | --js="node_modules/google-closure-library/closure/goog/**.js" \
22 | --js="src/**.js" \
23 | --entry_point=bundleEditor \
24 | --flagfile="bin/common.flags" \
25 | --define="chartEditor.model.Base.SOLUTION='$1'" \
26 | --define="chartEditor.editor.Base.VERSION='$PACKAGE_VERSION'"
27 |
28 | DATE=`date +%Y-%m-%d`
29 |
30 | HEADER=$'/**
31 | * AnyChart is lightweight robust charting library with great API and Docs,
32 | * that works with your stack and has tons of chart types and features.
33 | *
34 | * Chart Editor is an out-of-the-box chart generator and editor with intuitive user interface
35 | * that can be easily embedded into any web service or web view based desktop application.
36 | * AnyChart Chart Editor allows you to leverage the entire power of AnyChart with minimal integration effort.
37 | *
38 | * Version: '${PACKAGE_VERSION}' ('${DATE}')
39 | * License: https://www.anychart.com/buy/
40 | * Contact: sales@anychart.com
41 | * Copyright: AnyChart.com 2018. All rights reserved.
42 | */'
43 |
44 | echo "$HEADER" | cat - "$LOCATION" > temp && mv temp "$LOCATION"
45 |
46 | sh ./bin/css.sh $1
47 |
48 | if [ -z $1 ]
49 | then
50 | echo " Compilation of vanilla chart editor complete: $LOCATION"
51 | else
52 | echo " Compilation of chart editor for $1 complete: $LOCATION"
53 | fi
54 |
55 | echo ""
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/css/checkbox.less:
--------------------------------------------------------------------------------
1 | @import "variables.less";
2 |
3 | /* ------- CHECKBOX ------- */
4 |
5 | .anychart-ce-checkbox {
6 | cursor: pointer;
7 | display: inline-block;
8 |
9 | overflow: hidden;
10 | padding: 0;
11 |
12 | position: relative;
13 | white-space: nowrap;
14 | vertical-align: middle;
15 |
16 | .anychart-ce-checkbox-element {
17 | .border-radius(4px);
18 | .box-sizing(content-box);
19 |
20 | background: @color-background;
21 | border: 1px solid @color-background;
22 | color: @color-blue;
23 |
24 | height: 20px;
25 | width: 20px;
26 |
27 | outline: 0;
28 | vertical-align: text-bottom;
29 | }
30 | }
31 |
32 | .anychart-ce-checkbox-hover {
33 | .anychart-ce-checkbox-element {
34 |
35 | }
36 | }
37 |
38 | .anychart-ce-checkbox-focused {
39 | .anychart-ce-checkbox-element {
40 | border-color: @color-shadow;
41 | }
42 | }
43 |
44 | .anychart-ce-checkbox-checked {
45 | background-color: #fff;
46 | background-color: rgba(255,255,255,.65);
47 |
48 | .anychart-ce-checkbox-checkmark {
49 | display: block;
50 | }
51 | }
52 |
53 | .anychart-ce-checkbox-undetermined {
54 |
55 | }
56 |
57 | .anychart-ce-checkbox-unchecked {
58 | .anychart-ce-checkbox-checkmark {
59 | display: none !important;
60 | }
61 | }
62 |
63 | .anychart-ce-checkbox-caption {
64 | color: @color-label;
65 | padding: 0 10px;
66 | }
67 |
68 | .anychart-ce-checkbox-disabled {
69 | cursor: default;
70 | color: @color-text-disabled;
71 |
72 | .anychart-ce-checkbox-element {
73 | //background-color: @color-border-disabled;
74 | border: 1px solid @color-border-disabled !important;
75 | cursor: default;
76 | }
77 | .anychart-ce-checkbox-caption {
78 | color: @color-text-disabled;
79 | }
80 | }
81 | .anychart-ce-checkbox-disabled.anychart-ce-checkbox-checked {
82 | .anychart-ce-checkbox-element {
83 | background-color: @color-background !important;
84 | }
85 | .anychart-ce-checkbox-checkmark {
86 | color: @color-text-disabled !important;
87 | }
88 | }
89 |
90 | .anychart-ce-checkbox-checkmark {
91 | display: none;
92 | height: 15px;
93 | width: 15px;
94 | outline: 0;
95 | position: relative;
96 | left: 2px;
97 | }
--------------------------------------------------------------------------------
/css/combobox.less:
--------------------------------------------------------------------------------
1 | @import "variables.less";
2 |
3 | .anychart-ce-combobox {
4 | .border-radius(4px);
5 | .box-sizing(content-box);
6 |
7 | height: 30px;
8 |
9 | background: @color-background;
10 | border: 1px solid @color-background;
11 | color: @color-text;
12 |
13 | -webkit-user-select: none;
14 | -moz-user-select: none;
15 | -ms-user-select: none;
16 |
17 | line-height: 24px;
18 | list-style: none;
19 | font-size: 11px;
20 | font-weight: bold;
21 | text-decoration: none;
22 | vertical-align: middle;
23 | cursor: pointer;
24 |
25 | input {
26 | .border-radius(4px);
27 | .box-sizing(content-box);
28 | width: 35px;
29 |
30 | font-size: 13px;
31 | color: @color-text;
32 | padding: 3px 5px;
33 | margin: 3px;
34 |
35 | border: 1px solid transparent;
36 | overflow: hidden;
37 | position: relative;
38 |
39 | &:focus {
40 | background: #ffffff;
41 | -webkit-user-select: text;
42 | -moz-user-select: text;
43 |
44 | border: 1px solid #4d90fe;
45 | height: 16px;
46 | outline: none;
47 | }
48 | }
49 | }
50 |
51 | .anychart-ce-combobox-disabled {
52 | //border-color: @color-border-disabled !important;
53 | cursor: default;
54 |
55 | input {
56 | color: @color-text-disabled;
57 | background-color: inherit;
58 | }
59 |
60 | .anychart-ce-combobox-button {
61 | border-color: @color-border-disabled transparent;
62 | }
63 | }
64 |
65 | .anychart-ce-combobox-active {
66 | border-bottom-left-radius: 0;
67 | border-bottom-right-radius: 0;
68 | border: 1px solid @color-border;
69 | border-bottom: 1px solid transparent;
70 |
71 | .anychart-ce-combobox-button {
72 | .rotate(180deg);
73 | }
74 | }
75 |
76 | .anychart-ce-combobox-button {
77 | @thickness: 3px;
78 | @unitSize: 6px;
79 | width: 0;
80 | height: 0;
81 | position: relative;
82 | display: inline-block;
83 |
84 | float: right;
85 | margin: 12px 5px @unitSize 3px;
86 |
87 | border-right: @unitSize solid transparent;
88 | border-left: @unitSize solid transparent;
89 | border-top: (@unitSize * 1) solid @color-arrow;
90 | //margin-bottom: @unitSize;
91 |
92 | &:before {
93 | content: "";
94 | position: absolute;
95 |
96 | border-right: @unitSize solid transparent;
97 | border-left: @unitSize solid transparent;
98 | border-top: (@unitSize * 1) solid @color-background;
99 | margin-bottom: @unitSize;
100 |
101 | left: -@unitSize;
102 | top: -(@unitSize + @thickness);
103 | }
104 | }
105 |
--------------------------------------------------------------------------------
/css/dialog.qlik.less:
--------------------------------------------------------------------------------
1 | @import "variables.qlik.less";
2 | @import "dialog.less";
3 |
4 | // region ---- Qlik theme
5 | .anychart-ce-dialog-qlik-theme {
6 | .anychart-ce-dialog-title {
7 | padding: 4px 14px;
8 | }
9 | .anychart-ce-dialog-content {
10 | top: 53px;
11 | left: 0;
12 | right: 0;
13 | bottom: 0;
14 | }
15 | .anychart-ce-dialog-title-close {
16 | margin-top: -3px;
17 | margin-right: 3px;
18 | }
19 | }
20 | // endregion
--------------------------------------------------------------------------------
/css/dialog.tableau.less:
--------------------------------------------------------------------------------
1 | @import "variables.qlik.less";
2 | @import "dialog.less";
3 |
4 | // region ---- Tableau theme
5 | .anychart-ce-dialog-tableau-theme {
6 | .anychart-ce-dialog-title {
7 | padding: 4px 14px;
8 | }
9 | .anychart-ce-dialog-content {
10 | top: 53px;
11 | left: 0;
12 | right: 0;
13 | bottom: 0;
14 | }
15 | .anychart-ce-dialog-title-close {
16 | margin-top: -3px;
17 | margin-right: 3px;
18 | }
19 | }
20 | // endregion
--------------------------------------------------------------------------------
/css/variables.freeboard.less:
--------------------------------------------------------------------------------
1 | @import "variables.less";
2 |
3 | // region ---- Freeboard theme
4 |
5 | @color-background: #f1f1f1;
6 |
7 | @color-blue: #f8a235;
8 | @color-blue-hovered: #da8418;
9 | @color-blue-disabled: #9c9c9c;
10 |
11 | @color-border: #b3b3b3;
12 | @color-border-disabled: #e4e4e4;
13 | @color-arrow: @color-border;
14 |
15 | @color-text: #4d4d4d;
16 | @color-text-disabled: #bcbcbc;
17 | @color-label: #969696;
18 | @color-caption: #222222;
19 | @color-text2: #31424f;
20 |
21 | @color-hovered: #caf1fe;
22 | @color-checked: #dde5ea;
23 | @color-breadcrumbs-back: @color-text;
24 |
25 | @color-menu-item-highlight-color: white;
26 | @color-menu-item--highlight-background: #1e90ff;
27 | @color-button-hover-background: #c9e1f0;
28 | @color-button-active-background: #f5f5f5;
29 | @color-dialog-background: #92a0b3;
30 | @color-content-background: #e5e5e5;
31 |
32 | @color-shadow: #dbdbdb;
33 | @shadow-1: none;
34 | @shadow-dialog: 0 4px 16px rgba(0, 0, 0, .2);
35 |
36 | @color-special-value: #fff1e9;
37 | // endregion ---- Freeboard theme
--------------------------------------------------------------------------------
/css/variables.less:
--------------------------------------------------------------------------------
1 | @import "mixins.less";
2 |
3 | @color-background: #e9edf0;
4 |
5 | @color-blue: #469ced;
6 | @color-blue-hovered: #02befc;
7 | @color-blue-disabled: #738db0;
8 |
9 | @color-green-loaded: #5dff7e;
10 |
11 | @color-border: #c7d8e4;
12 | @color-border-disabled: #adc0d9 transparent;
13 | @color-arrow: #738db0;
14 |
15 | @color-text: #4a6181;
16 | @color-text-disabled: #a9bad0;
17 | @color-text2: #31424f;
18 | @color-label: #7e92ad;
19 | @color-caption: #171c20;
20 |
21 | @color-hovered: #caf1fe;
22 | @color-checked: #dde5ea;
23 | @color-breadcrumbs-back: @color-text;
24 |
25 | @color-menu-item-highlight-color: @color-blue;
26 | @color-menu-item--highlight-background: #d0ebff;
27 | @color-button-hover-background: #ecf7ff;
28 | @color-button-active-background: #ecf7ff;
29 | @color-dialog-background: #92a0b3;
30 | @color-content-background: white;
31 | @color-error: #ff5f7f;
32 | @color-special-value: #e0eef9;
33 |
34 | @color-shadow: #c4d5df;
35 | @shadow-1: 0 0 8px @color-shadow;
36 | @shadow-dialog: 0 4px 16px rgba(0, 0, 0, .2);
37 |
--------------------------------------------------------------------------------
/css/variables.qlik.less:
--------------------------------------------------------------------------------
1 | @import "variables.less";
2 |
3 | // region ---- Qlik theme
4 |
5 | @color-background: #f1f1f1;
6 |
7 | @color-blue: #f8a235;
8 | @color-blue-hovered: #da8418;
9 | @color-blue-disabled: #9c9c9c;
10 |
11 | @color-border: #b3b3b3;
12 | @color-border-disabled: #e4e4e4;
13 | @color-arrow: @color-border;
14 |
15 | @color-text: #4d4d4d;
16 | @color-text-disabled: #bcbcbc;
17 | @color-label: #969696;
18 | @color-caption: #222222;
19 | @color-text2: #31424f;
20 |
21 | @color-hovered: #caf1fe;
22 | @color-checked: #dde5ea;
23 | @color-breadcrumbs-back: @color-text;
24 |
25 | @color-menu-item-highlight-color: white;
26 | @color-menu-item--highlight-background: #1e90ff;
27 | @color-button-hover-background: #c9e1f0;
28 | @color-button-active-background: #f5f5f5;
29 | @color-dialog-background: #92a0b3;
30 | @color-content-background: #e5e5e5;
31 |
32 | @color-shadow: #dbdbdb;
33 | @shadow-1: none;
34 | @shadow-dialog: 0 4px 16px rgba(0, 0, 0, .2);
35 |
36 | @color-special-value: #fff1e9;
37 | // endregion ---- Qlik theme
--------------------------------------------------------------------------------
/css/variables.tableau.less:
--------------------------------------------------------------------------------
1 | @import "variables.less";
2 |
3 | // region ---- Tableau theme
4 |
5 | @color-background: #f1f1f1;
6 |
7 | @color-blue: #f8a235;
8 | @color-blue-hovered: #da8418;
9 | @color-blue-disabled: #9c9c9c;
10 |
11 | @color-border: #b3b3b3;
12 | @color-border-disabled: #e4e4e4;
13 | @color-arrow: @color-border;
14 |
15 | @color-text: #4d4d4d;
16 | @color-text-disabled: #bcbcbc;
17 | @color-label: #969696;
18 | @color-caption: #222222;
19 | @color-text2: #31424f;
20 |
21 | @color-hovered: #caf1fe;
22 | @color-checked: #dde5ea;
23 | @color-breadcrumbs-back: @color-text;
24 |
25 | @color-menu-item-highlight-color: white;
26 | @color-menu-item--highlight-background: #1e90ff;
27 | @color-button-hover-background: #c9e1f0;
28 | @color-button-active-background: #f5f5f5;
29 | @color-dialog-background: #92a0b3;
30 | @color-content-background: #e5e5e5;
31 |
32 | @color-shadow: #dbdbdb;
33 | @shadow-1: none;
34 | @shadow-dialog: 0 4px 16px rgba(0, 0, 0, .2);
35 |
36 | @color-special-value: #fff1e9;
37 | // endregion ---- Tableau theme
--------------------------------------------------------------------------------
/dist/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/dist/index.js:
--------------------------------------------------------------------------------
1 | anychart.onDocumentReady(function() {
2 | // Create editor instance
3 | var editor = anychart.editor();
4 |
5 | // console.log(editor.version());
6 |
7 | // Add your data from code
8 | // editor.data({
9 | // data: [
10 | // {name: 'Jan', val1: 10, price: 20.5, amount: 100},
11 | // {name: 'Feb', val1: 20, price: 30, amount: 200},
12 | // {name: 'Mar', val1: 5, price: 115, amount: 10}
13 | // ],
14 | // chartType: 'column',
15 | // fieldNames: {
16 | // name: 'Month',
17 | // val1: 'Value 1'
18 | // },
19 | // title: 'Awesome Chart'
20 | // });
21 |
22 | // Render editor to div#container
23 | editor.render(document.getElementById("container"));
24 |
25 | editor.listen('editorComplete', function() {
26 | console.log(editor.getJavascript());
27 | });
28 | });
--------------------------------------------------------------------------------
/editor.js:
--------------------------------------------------------------------------------
1 | goog.provide('editor');
2 |
3 | goog.require('chartEditor.editor.Chart');
4 | goog.require('chartEditor.editor.Stock');
5 | goog.require('chartEditor.editor.Map');
6 | goog.require('chartEditor.editor.Gantt');
7 |
8 | /**
9 | * Set default css name mapping for anychart chart editor ui.
10 | */
11 | goog.setCssNameMapping({
12 | 'goog': 'anychart-ce'
13 | });
14 |
15 | chartEditor.DEVELOP = true;
16 |
17 | chartEditor.PRODUCT = chartEditor.model.Product.BUNDLE;
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./dist/js/anychart-editor.min.js');
2 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "chart-editor",
3 | "version": "1.2.0",
4 | "description": "AnyChart Chart Editor utility",
5 | "main": "index.js",
6 | "scripts": {
7 | "deps": "sh ./bin/build.sh deps",
8 | "css": "sh ./bin/build.sh css",
9 | "bundle": "sh ./bin/bundle.sh",
10 | "bundleAll": "sh ./bin/bundle.sh all",
11 | "bundleQlik": "sh ./bin/bundle.sh qlik",
12 | "bundleTableau": "sh ./bin/bundle.sh tableau",
13 | "bundleFreeboard": "sh ./bin/bundle.sh freeboard"
14 | },
15 | "repository": {
16 | "type": "git",
17 | "url": "git+https://github.com/AnyChart/chart-editor.git"
18 | },
19 | "keywords": [
20 | "anychart",
21 | "anystock",
22 | "anymap",
23 | "charts",
24 | "plots",
25 | "line charts",
26 | "bar charts",
27 | "pie charts",
28 | "choropleth map",
29 | "javascript charts",
30 | "javascript plots",
31 | "javascript",
32 | "SVG",
33 | "HTML5",
34 | "VML"
35 | ],
36 | "author": "AnyChart",
37 | "license": "Apache-2.0",
38 | "bugs": {
39 | "url": "https://github.com/AnyChart/chart-editor/issues"
40 | },
41 | "homepage": "https://github.com/AnyChart/chart-editor",
42 | "devDependencies": {
43 | "google-closure-compiler": "^20180204.0.0",
44 | "google-closure-library": "^20180204.0.0",
45 | "less": "^3.9.0",
46 | "less-plugin-clean-css": "^1.5.1"
47 | },
48 | "dependencies": {
49 | "anychart": "^8.5.1"
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/basicEditor.js:
--------------------------------------------------------------------------------
1 | goog.provide('basicEditor');
2 |
3 | goog.require('chartEditor.editor.Basic');
4 |
5 | /**
6 | * Set default css name mapping for anychart chart editor ui.
7 | */
8 | goog.setCssNameMapping({
9 | 'goog': 'anychart-ce'
10 | });
11 |
12 | chartEditor.DEVELOP = true;
13 |
14 | chartEditor.PRODUCT = chartEditor.model.Product.BASIC;
--------------------------------------------------------------------------------
/src/bundleEditor.js:
--------------------------------------------------------------------------------
1 | goog.provide('bundleEditor');
2 |
3 | goog.require('chartEditor.editor.bundle');
4 |
5 | /**
6 | * Set default css name mapping for anychart chart editor ui.
7 | */
8 | goog.setCssNameMapping({
9 | 'goog': 'anychart-ce'
10 | });
11 |
12 | chartEditor.DEVELOP = true;
13 |
14 | chartEditor.PRODUCT = chartEditor.model.Product.BUNDLE;
--------------------------------------------------------------------------------
/src/chartEditor.js:
--------------------------------------------------------------------------------
1 | goog.provide('chartEditor');
2 |
3 | goog.require('chartEditor.editor.Chart');
4 |
5 | /**
6 | * Set default css name mapping for anychart chart editor ui.
7 | */
8 | goog.setCssNameMapping({
9 | 'goog': 'anychart-ce'
10 | });
11 |
12 | chartEditor.DEVELOP = true;
13 |
14 | chartEditor.PRODUCT = chartEditor.model.Product.CHART;
--------------------------------------------------------------------------------
/src/editor/Chart.js:
--------------------------------------------------------------------------------
1 | goog.provide('chartEditor.editor.Chart');
2 |
3 | goog.require('chartEditor.editor.Base');
4 | goog.require('chartEditor.model.Chart');
5 |
6 |
7 | /**
8 | * Editor ui for Chart Editor
9 | *
10 | * @constructor
11 | * @param {goog.dom.DomHelper=} opt_domHelper Optional DOM helper; see {@link goog.ui.Component} for semantics.
12 | * @param {chartEditor.enums.ChartType=} opt_lockedChartType - Locked chart type.
13 | * @extends {chartEditor.editor.Base}
14 | */
15 | chartEditor.editor.Chart = function(opt_domHelper, opt_lockedChartType) {
16 | chartEditor.editor.Chart.base(this, 'constructor', opt_domHelper, opt_lockedChartType);
17 |
18 | this.setModel(new chartEditor.model.Chart());
19 |
20 | this.addClassName(goog.getCssName('anychart-ce-chart'));
21 | };
22 | goog.inherits(chartEditor.editor.Chart, chartEditor.editor.Base);
23 |
24 |
25 | /**
26 | * Constructor function for Stock Editor.
27 | * @param {chartEditor.enums.ChartType=} opt_lockedChartType - Locked chart type.
28 | * @return {chartEditor.editor.Chart}
29 | */
30 | window['anychart'].chartEditor = function(opt_lockedChartType) {
31 | return new chartEditor.editor.Chart(void 0, opt_lockedChartType);
32 | };
33 |
34 | //exports
35 | (function() {
36 | goog.exportSymbol('anychart.chartEditor', window['anychart'].chartEditor);
37 | })();
38 |
--------------------------------------------------------------------------------
/src/editor/Gantt.js:
--------------------------------------------------------------------------------
1 | goog.provide('chartEditor.editor.Gantt');
2 |
3 | goog.require('chartEditor.editor.Base');
4 | goog.require('chartEditor.model.Gantt');
5 | goog.require('chartEditor.utils');
6 |
7 |
8 |
9 | /**
10 | * Editor ui for Gantt Editor
11 | *
12 | * @constructor
13 | * @param {goog.dom.DomHelper=} opt_domHelper Optional DOM helper; see {@link goog.ui.Component} for semantics.
14 | * @param {chartEditor.enums.ChartType=} opt_lockedChartType - Locked chart type.
15 | * @extends {chartEditor.editor.Base}
16 | */
17 | chartEditor.editor.Gantt = function(opt_domHelper, opt_lockedChartType) {
18 | chartEditor.editor.Gantt.base(this, 'constructor', opt_domHelper, opt_lockedChartType);
19 |
20 | this.setModel(new chartEditor.model.Gantt());
21 |
22 | this.addClassName(goog.getCssName('anychart-ce-gantt'));
23 | };
24 | goog.inherits(chartEditor.editor.Gantt, chartEditor.editor.Base);
25 |
26 |
27 | /**
28 | * Constructor function for Map Editor.
29 | * @param {chartEditor.enums.ChartType=} opt_lockedChartType - Locked chart type.
30 | * @return {chartEditor.editor.Gantt}
31 | */
32 | window['anychart'].ganttEditor = function(opt_lockedChartType) {
33 | return new chartEditor.editor.Gantt(void 0, opt_lockedChartType);
34 | };
35 |
36 |
37 | /**
38 | * Wrapper function for preprocessing mapping for Gantt Resource chart.
39 | * @param {Object} mappingObj default mapping for the current chart type
40 | * @return {Object}
41 | */
42 | chartEditor.editor.Gantt.preprocessResourceMapping = function(mappingObj) {
43 | return chartEditor.utils.preprocessResourceMapping(mappingObj);
44 | };
45 |
46 |
47 | /**
48 | * Wrapper function for preprocessing data for Gantt Resource chart.
49 | * @param {Array.