Metamaterial Properties: Interactive Plot
+2D Pixelated Static Metamaterial Properties: Interactive Plot
Select properties from the dropdown menus below to graph on the x and y axes.
@@ -10,16 +10,16 @@diff --git a/app/src/modules/gql/metamaterial-gql.js b/app/src/modules/gql/metamaterial-gql.js new file mode 100644 index 00000000..ecd196c4 --- /dev/null +++ b/app/src/modules/gql/metamaterial-gql.js @@ -0,0 +1,33 @@ +import gql from 'graphql-tag' + +export const METAMATERIAL_QUERY = gql` + query PixelData($input: pixelDataQueryInput!) { + pixelData(input: $input) { + totalItems + data { + symmetry + unit_cell_x_pixels + C11 + C12 + C22 + C16 + C26 + C66 + CM0 + CM0_C11 + CM0_C12 + CM0_C22 + CM0_C16 + CM0_C26 + CM0_C66 + CM1 + CM1_C11 + CM1_C12 + CM1_C22 + CM1_C16 + CM1_C26 + CM1_C66 + geometry_full + } + } +}` diff --git a/app/src/modules/metamine/metamaterial-vega-spec.js b/app/src/modules/metamine/metamaterial-vega-spec.js index 4c795d08..61c4de26 100644 --- a/app/src/modules/metamine/metamaterial-vega-spec.js +++ b/app/src/modules/metamine/metamaterial-vega-spec.js @@ -42,14 +42,14 @@ const baseSpec = { padding: 10 } }, - color: { - field: 'symmetry', - type: 'nominal', - title: 'Symmetry', - legend: { - orient: 'top' - } - }, + // color: { + // field: 'symmetry', + // type: 'nominal', + // title: 'Symmetry', + // legend: { + // orient: 'top' + // } + // }, tooltip: [ { field: 'symmetry', @@ -158,11 +158,11 @@ const baseSpec = { }, title: 'C11' }, - color: { - field: 'symmetry', - type: 'nominal', - title: 'Symmetry' - }, + // color: { + // field: 'symmetry', + // type: 'nominal', + // title: 'Symmetry' + // }, opacity: { condition: { test: { @@ -213,11 +213,11 @@ const baseSpec = { }, title: 'C12' }, - color: { - field: 'symmetry', - type: 'nominal', - title: 'Symmetry' - }, + // color: { + // field: 'symmetry', + // type: 'nominal', + // title: 'Symmetry' + // }, opacity: { condition: { test: { @@ -268,11 +268,11 @@ const baseSpec = { }, title: 'C22' }, - color: { - field: 'symmetry', - type: 'nominal', - title: 'Symmetry' - }, + // color: { + // field: 'symmetry', + // type: 'nominal', + // title: 'Symmetry' + // }, opacity: { condition: { test: { @@ -323,11 +323,11 @@ const baseSpec = { }, title: 'C16' }, - color: { - field: 'symmetry', - type: 'nominal', - title: 'Symmetry' - }, + // color: { + // field: 'symmetry', + // type: 'nominal', + // title: 'Symmetry' + // }, opacity: { condition: { test: { @@ -378,11 +378,11 @@ const baseSpec = { }, title: 'C26' }, - color: { - field: 'symmetry', - type: 'nominal', - title: 'Symmetry' - }, + // color: { + // field: 'symmetry', + // type: 'nominal', + // title: 'Symmetry' + // }, opacity: { condition: { test: { @@ -433,13 +433,13 @@ const baseSpec = { }, title: 'C66' }, - color: { - field: 'symmetry', - type: 'nominal', - title: 'Symmetry', - scale: { scheme: 'category10' } + // color: { + // field: 'symmetry', + // type: 'nominal', + // title: 'Symmetry', + // scale: { scheme: 'category10' } - }, + // }, opacity: { condition: { test: { @@ -600,7 +600,7 @@ function createPatch (xAxis, yAxis) { } }, { - path: '/scales/1', + path: '/scales/0', op: 'replace', value: { domain: { @@ -623,7 +623,7 @@ function createPatch (xAxis, yAxis) { } }, { - path: '/scales/2', + path: '/scales/1', op: 'replace', value: { domain: { diff --git a/app/src/pages/metamine/visualization/metamaterial-plot.html b/app/src/pages/metamine/visualization/metamaterial-plot.html index e79bf035..573ce816 100644 --- a/app/src/pages/metamine/visualization/metamaterial-plot.html +++ b/app/src/pages/metamine/visualization/metamaterial-plot.html @@ -1,7 +1,7 @@
Select properties from the dropdown menus below to graph on the x and y axes.
@@ -10,16 +10,16 @@