diff --git a/test/image/baselines/ticklabelposition-0.png b/test/image/baselines/ticklabelposition-0.png new file mode 100644 index 00000000000..0616806a5e8 Binary files /dev/null and b/test/image/baselines/ticklabelposition-0.png differ diff --git a/test/image/baselines/ticklabelposition-1.png b/test/image/baselines/ticklabelposition-1.png new file mode 100644 index 00000000000..63edc2f1395 Binary files /dev/null and b/test/image/baselines/ticklabelposition-1.png differ diff --git a/test/image/baselines/ticklabelposition-2.png b/test/image/baselines/ticklabelposition-2.png new file mode 100644 index 00000000000..479724bc50e Binary files /dev/null and b/test/image/baselines/ticklabelposition-2.png differ diff --git a/test/image/mocks/ticklabelposition-0.json b/test/image/mocks/ticklabelposition-0.json new file mode 100644 index 00000000000..5f6c9c108fc --- /dev/null +++ b/test/image/mocks/ticklabelposition-0.json @@ -0,0 +1,138 @@ +{ + "data": [{ + "xaxis": "x", + "yaxis": "y", + "x": [0, 1000], + "y": [1e-1, 1e+6] + }, { + "xaxis": "x2", + "yaxis": "y2", + "x": [0, 1000], + "y": [1e-1, 1e+6] + }, { + "xaxis": "x3", + "yaxis": "y3", + "x": [0, 1000], + "y": [1e-1, 1e+6] + }, { + "xaxis": "x4", + "yaxis": "y4", + "x": [0, 1000], + "y": [1e-1, 1e+6] + }], + "layout": { + "xaxis": { + "anchor": "y", + "domain": [0, 0.475], + "side": "bottom", + "ticks": "outside", + "ticklabelposition": "outside right", + "tickfont": { "size": 16 }, + "ticklen": 16, + "tickwidth": 8, + "linewidth": 1, + "gridcolor": "white" + }, + "yaxis": { + "anchor": "x", + "domain": [0, 0.475], + "autorange": "reversed", + "type": "log", + "side": "left", + "ticks": "inside", + "ticklabelposition": "outside top", + "tickfont": { "size": 20 }, + "ticklen": 8, + "tickwidth": 2, + "linewidth": 4, + "gridcolor": "white" + }, + "xaxis2": { + "anchor": "y2", + "domain": [0.525, 1], + "autorange": "reversed", + "side": "bottom", + "ticks": "inside", + "ticklabelposition": "outside right", + "tickfont": { "size": 20 }, + "ticklen": 8, + "tickwidth": 2, + "linewidth": 4, + "gridcolor": "white" + }, + "yaxis2": { + "anchor": "x2", + "domain": [0, 0.475], + "type": "log", + "side": "right", + "ticks": "inside", + "ticklabelposition": "outside top", + "tickfont": { "size": 16 }, + "ticklen": 16, + "tickwidth": 8, + "linewidth": 1, + "gridcolor": "white" + }, + "xaxis3": { + "anchor": "y3", + "domain": [0.525, 1], + "side": "top", + "ticks": "outside", + "ticklabelposition": "outside left", + "tickfont": { "size": 20 }, + "ticklen": 16, + "tickwidth": 8, + "linewidth": 1, + "gridcolor": "white" + }, + "yaxis3": { + "anchor": "x3", + "domain": [0.525, 1], + "autorange": "reversed", + "type": "log", + "side": "right", + "ticks": "outside", + "ticklabelposition": "outside bottom", + "tickfont": { "size": 16 }, + "ticklen": 8, + "tickwidth": 2, + "linewidth": 4, + "gridcolor": "white" + }, + "xaxis4": { + "anchor": "y4", + "domain": [0, 0.475], + "autorange": "reversed", + "side": "top", + "ticks": "inside", + "ticklabelposition": "outside right", + "tickangle": -60, + "tickfont": { "size": 16 }, + "ticklen": 8, + "tickwidth": 2, + "linewidth": 4, + "gridcolor": "white" + }, + "yaxis4": { + "anchor": "x4", + "domain": [0.525, 1], + "type": "log", + "side": "left", + "ticks": "inside", + "ticklabelposition": "outside bottom", + "tickangle": 30, + "tickfont": { "size": 16 }, + "ticklen": 16, + "tickwidth": 8, + "linewidth": 1, + "gridcolor": "white" + }, + "font": { + "family": "Raleway" + }, + "plot_bgcolor": "lightblue", + "showlegend": false, + "width": 1000, + "height": 1000 + } +} diff --git a/test/image/mocks/ticklabelposition-1.json b/test/image/mocks/ticklabelposition-1.json new file mode 100644 index 00000000000..7ab7726269c --- /dev/null +++ b/test/image/mocks/ticklabelposition-1.json @@ -0,0 +1,149 @@ +{ + "data": [{ + "xaxis": "x", + "yaxis": "y", + "x": ["20-12-15", "21-01-15"], + "y": [1e-1, 1e+6] + }, { + "xaxis": "x2", + "yaxis": "y2", + "x": ["20-10", "21-06"], + "y": [1e-1, 1e+6] + }, { + "xaxis": "x3", + "yaxis": "y3", + "x": ["20", "23"], + "y": [1e-1, 1e+6] + }, { + "xaxis": "x4", + "yaxis": "y4", + "x": ["01", "10"], + "y": [1e-1, 1e+6] + }], + "layout": { + "xaxis": { + "anchor": "y", + "domain": [0, 0.475], + "type": "date", + "ticklabelmode": "period", + "side": "bottom", + "ticks": "inside", + "ticklabelposition": "inside", + "tickfont": { "size": 16 }, + "ticklen": 16, + "tickwidth": 8, + "linewidth": 1, + "gridcolor": "white" + }, + "yaxis": { + "anchor": "x", + "domain": [0, 0.475], + "autorange": "reversed", + "type": "log", + "side": "left", + "ticks": "inside", + "ticklabelposition": "inside top", + "tickfont": { "size": 20 }, + "ticklen": 8, + "tickwidth": 2, + "linewidth": 4, + "gridcolor": "white" + }, + "xaxis2": { + "anchor": "y2", + "domain": [0.525, 1], + "autorange": "reversed", + "type": "date", + "side": "bottom", + "ticks": "inside", + "ticklabelposition": "inside left", + "tickfont": { "size": 20 }, + "ticklen": 8, + "tickwidth": 2, + "linewidth": 4, + "gridcolor": "white" + }, + "yaxis2": { + "anchor": "x2", + "domain": [0, 0.475], + "type": "log", + "side": "right", + "ticks": "inside", + "ticklabelposition": "inside", + "tickfont": { "size": 16 }, + "ticklen": 16, + "tickwidth": 8, + "linewidth": 1, + "gridcolor": "white" + }, + "xaxis3": { + "anchor": "y3", + "domain": [0.525, 1], + "type": "date", + "side": "top", + "ticks": "inside", + "ticklabelposition": "inside right", + "tickfont": { "size": 20 }, + "ticklen": 16, + "tickwidth": 8, + "linewidth": 1, + "gridcolor": "white" + }, + "yaxis3": { + "anchor": "x3", + "domain": [0.525, 1], + "autorange": "reversed", + "type": "log", + "side": "right", + "ticks": "inside", + "ticklabelposition": "inside bottom", + "tickfont": { "size": 16 }, + "ticklen": 8, + "tickwidth": 2, + "linewidth": 4, + "gridcolor": "white" + }, + "xaxis4": { + "anchor": "y4", + "domain": [0, 0.475], + "autorange": "reversed", + "type": "date", + "ticklabelmode": "period", + "side": "top", + "ticks": "inside", + "ticklabelposition": "inside", + "tickfont": { "size": 16 }, + "ticklen": 8, + "tickwidth": 2, + "linewidth": 4, + "gridcolor": "white" + }, + "yaxis4": { + "anchor": "x4", + "domain": [0.525, 1], + "type": "log", + "side": "left", + "ticks": "inside", + "ticklabelposition": "inside bottom", + "tickangle": 30, + "tickfont": { "size": 16 }, + "ticklen": 16, + "tickwidth": 8, + "linewidth": 1, + "gridcolor": "white" + }, + "font": { + "family": "Raleway" + }, + "plot_bgcolor": "lightblue", + "showlegend": false, + "width": 1000, + "height": 1000, + "margin": { + "t": 40, + "b": 40, + "l": 40, + "r": 40 + } + } +} diff --git a/test/image/mocks/ticklabelposition-2.json b/test/image/mocks/ticklabelposition-2.json new file mode 100644 index 00000000000..08d0065fbdd --- /dev/null +++ b/test/image/mocks/ticklabelposition-2.json @@ -0,0 +1,167 @@ +{ + "data": [{ + "yaxis": "y", + "xaxis": "x", + "y": ["20-11", "21-03"], + "x": [1e-1, 1e+6] + }, { + "yaxis": "y2", + "xaxis": "x2", + "y": ["20-10", "21-04"], + "x": [1e-1, 1e+6] + }, { + "yaxis": "y3", + "xaxis": "x3", + "y": ["01-01", "01-09"], + "x": [1e-1, 1e+6] + }, { + "yaxis": "y4", + "xaxis": "x4", + "y": ["01", "10"], + "x": [1e-1, 1e+6] + }], + "layout": { + "yaxis": { + "anchor": "x", + "domain": [0, 0.475], + "type": "date", + "ticklabelmode": "period", + "side": "left", + "ticks": "inside", + "ticklabelposition": "inside", + "tickfont": { "size": 16 }, + "ticklen": 16, + "tickwidth": 8, + "linewidth": 1, + "linecolor": "yellow", + "tickcolor": "yellow", + "gridcolor": "rgb(191,191,191)" + }, + "xaxis": { + "anchor": "y", + "domain": [0, 0.475], + "autorange": "reversed", + "type": "log", + "side": "bottom", + "ticks": "inside", + "ticklabelposition": "inside right", + "tickfont": { "size": 20 }, + "ticklen": 8, + "tickwidth": 2, + "linewidth": 4, + "linecolor": "yellow", + "tickcolor": "yellow", + "gridcolor": "rgb(191,191,191)" + }, + "yaxis2": { + "anchor": "x2", + "domain": [0.525, 1], + "autorange": "reversed", + "type": "date", + "side": "left", + "ticks": "inside", + "ticklabelposition": "inside bottom", + "tickfont": { "size": 20 }, + "ticklen": 8, + "tickwidth": 2, + "linewidth": 4, + "linecolor": "yellow", + "tickcolor": "yellow", + "gridcolor": "rgb(191,191,191)" + }, + "xaxis2": { + "anchor": "y2", + "domain": [0, 0.475], + "type": "log", + "side": "top", + "ticks": "inside", + "ticklabelposition": "inside right", + "tickfont": { "size": 16 }, + "ticklen": 16, + "tickwidth": 8, + "linewidth": 1, + "linecolor": "yellow", + "tickcolor": "yellow", + "gridcolor": "rgb(191,191,191)" + }, + "yaxis3": { + "anchor": "x3", + "domain": [0.525, 1], + "type": "date", + "side": "right", + "ticks": "inside", + "ticklabelposition": "inside bottom", + "tickfont": { "size": 20 }, + "ticklen": 16, + "tickwidth": 8, + "linewidth": 1, + "linecolor": "yellow", + "tickcolor": "yellow", + "gridcolor": "rgb(191,191,191)" + }, + "xaxis3": { + "anchor": "y3", + "domain": [0.525, 1], + "autorange": "reversed", + "type": "log", + "side": "top", + "ticks": "inside", + "ticklabelposition": "inside left", + "tickfont": { "size": 16 }, + "ticklen": 8, + "tickwidth": 2, + "linewidth": 4, + "linecolor": "yellow", + "tickcolor": "yellow", + "gridcolor": "rgb(191,191,191)" + }, + "yaxis4": { + "anchor": "x4", + "domain": [0, 0.475], + "autorange": "reversed", + "type": "date", + "ticklabelmode": "period", + "side": "right", + "ticks": "inside", + "ticklabelposition": "inside", + "tickangle": -45, + "tickfont": { "size": 16 }, + "ticklen": 8, + "tickwidth": 2, + "linewidth": 4, + "linecolor": "yellow", + "tickcolor": "yellow", + "gridcolor": "rgb(191,191,191)" + }, + "xaxis4": { + "anchor": "y4", + "domain": [0.525, 1], + "type": "log", + "side": "bottom", + "ticks": "inside", + "ticklabelposition": "inside left", + "tickangle": 45, + "tickfont": { "size": 16 }, + "ticklen": 16, + "tickwidth": 8, + "linewidth": 1, + "linecolor": "yellow", + "tickcolor": "yellow", + "gridcolor": "rgb(191,191,191)" + }, + "font": { + "family": "Raleway" + }, + "paper_bgcolor": "rgb(191,191,191)", + "plot_bgcolor": "rgb(63,63,63)", + "showlegend": false, + "width": 1000, + "height": 1000, + "margin": { + "t": 40, + "b": 40, + "l": 40, + "r": 40 + } + } +} diff --git a/test/jasmine/tests/mock_test.js b/test/jasmine/tests/mock_test.js index 7cd61e5b034..12c6aeb30e6 100644 --- a/test/jasmine/tests/mock_test.js +++ b/test/jasmine/tests/mock_test.js @@ -959,6 +959,9 @@ var list = [ 'tick-percent', 'tickformat', 'tickformatstops', + 'ticklabelposition-0', + 'ticklabelposition-1', + 'ticklabelposition-2', 'tickson_boundaries', 'titles-avoid-labels', 'trace_metatext', @@ -2032,6 +2035,9 @@ figs['tick-increment'] = require('@mocks/tick-increment'); figs['tick-percent'] = require('@mocks/tick-percent'); figs['tickformat'] = require('@mocks/tickformat'); figs['tickformatstops'] = require('@mocks/tickformatstops'); +figs['ticklabelposition-0'] = require('@mocks/ticklabelposition-0'); +figs['ticklabelposition-1'] = require('@mocks/ticklabelposition-1'); +figs['ticklabelposition-2'] = require('@mocks/ticklabelposition-2'); figs['tickson_boundaries'] = require('@mocks/tickson_boundaries'); // figs['titles-avoid-labels'] = require('@mocks/titles-avoid-labels'); // figs['trace_metatext'] = require('@mocks/trace_metatext');