Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow data insert in mocker #816

Merged
merged 6 commits into from
Apr 25, 2022
Merged

feat: allow data insert in mocker #816

merged 6 commits into from
Apr 25, 2022

Conversation

Caele
Copy link
Collaborator

@Caele Caele commented Apr 21, 2022

Motivation

Experimental setup to allow non-engine rendering of Nebula charts.
Example:

const mockedApp = await __DO_NOT_USE__.EnigmaMocker.fromGenericObjects();

const nebbie = embed(mockedApp, {
  types,
  context: {
    constraints: {
      select: true,
    },
  },
});

const hyper = hypercube({
    numRows: rowData.length,
    dimensions: [
      {
        value: (f, i) => rowData[i][0],
        override: {
          ...
        },
      },
    ],
    measures: [
      {
        value: (f, i) => rowData[i][1],
        override: {
          ...
        },
      },
    ],
  });

 nebbie.render({
    type: 'bar',
    element,
    properties: {
      _mock: {
        qHyperCubeDef: null,
        qHyperCube: hyper,
      },
    },
  });
}

@Caele Caele marked this pull request as ready for review April 25, 2022 11:52
@Caele Caele merged commit 1d9a0a2 into master Apr 25, 2022
@Caele Caele deleted the tsm/mocked-example branch April 25, 2022 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants