MCPcopy Create free account
hub / github.com/microsoft/SandDance / createAxis

Function createAxis

docs/app/js/sanddance-app.js:2992–3032  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

2990 });
2991}
2992function createAxis(props) {
2993 const { column , horizontal , labelBaseline , lineColor , scale , showLabels , showTitle , showLines , specViewOptions , title , titlePadding , zindex } = props;
2994 const axis = Object.assign(Object.assign(Object.assign(Object.assign({
2995 zindex,
2996 scale: scale.name,
2997 orient: horizontal ? "bottom" : "left",
2998 domain: showLines,
2999 ticks: showLines
3000 }, showLines && {
3001 domainColor: lineColor,
3002 tickColor: lineColor,
3003 tickSize: specViewOptions.tickSize
3004 }), showTitle && {
3005 title,
3006 titleAlign: horizontal ? "left" : "right",
3007 titleAngle: {
3008 signal: horizontal ? (0, _constants.SignalNames).TextAngleX : (0, _constants.SignalNames).TextAngleY
3009 },
3010 titleColor: specViewOptions.colors.axisText,
3011 titleFontSize: {
3012 signal: (0, _constants.SignalNames).TextTitleSize
3013 },
3014 titleLimit: (0, _defaults.axesTitleLimit),
3015 titlePadding
3016 }), {
3017 labels: showLabels
3018 }), showLabels && {
3019 labelAlign: horizontal ? "left" : "right",
3020 labelBaseline,
3021 labelAngle: {
3022 signal: horizontal ? (0, _constants.SignalNames).TextAngleX : (0, _constants.SignalNames).TextAngleY
3023 },
3024 labelColor: specViewOptions.colors.axisText,
3025 labelFontSize: {
3026 signal: (0, _constants.SignalNames).TextSize
3027 },
3028 labelLimit: (0, _defaults.axesLabelLimit)
3029 });
3030 if (column.quantitative) axis.format = "~r";
3031 return axis;
3032}
3033
3034},{"./constants":"9PPhV","./defaults":"lzTCE","./scope":"91ogX","@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"91ogX":[function(require,module,exports) {
3035var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");

Callers 1

addGlobalAxesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected