Skip to content

Conversation

@jarjee
Copy link
Collaborator

@jarjee jarjee commented Aug 23, 2021

As part of this PR, I've removed the BETA tag from the click event examples, and I've created a programmatic highlighting example.

screencast-1629678141.mp4

It includes some examples via the select, and you can also pass in custom filters.

@jarjee jarjee added the enhancement New feature or request label Aug 23, 2021
@jarjee jarjee self-assigned this Aug 23, 2021
@kirangp kirangp self-requested a review August 23, 2021 03:30
await setSnippet(snippet);
}

async function onTextChange(event) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: The sample may be a bit more predictable if updating the query happened on a button click, rather than on text change?

@jarjee
Copy link
Collaborator Author

jarjee commented Aug 25, 2021

I've applied all the requests other than the button, I'm not sure if having an 'apply' button makes it much easier.

image

Copy link

@tomhollander tomhollander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there, just a couple more carryovers in the README that need purging.

Copy link
Collaborator

@kirangp kirangp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jarjee Thanks for the call. The functionality works great. LGTM

<option value="simple">Exact match</option>
<option value="range">Using comparisons</option>
<option value="complex">Using $and</option>
<option value="empty">Applying {}</option>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be more clear if the text here is 'Remove highlights' instead of "Applying {}"?

@@ -0,0 +1,23 @@
{
"name": "charts-sdk-example-click-events-filtering",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"name": "charts-sdk-example-click-events-filtering",
"name": "charts-sdk-example-programmatic-highlighting",


MongoDB Charts allows you to create visualizations of your MongoDB data using a simple web interface. You can view the visualizations within the Charts UI, or you can use the Embedding feature to render the charts in an external web application.

When you embed charts using the Embedding SDK, you ae able to customise the embedded charts by setting attributes. One of these is `setHighlight()`, which lets you emphasise part of your charts to attract attention. This feature adds a layer of richness to interactive charts, and can be used to show relationships between charts. To learn the basics of interactive charts, see the [click events](https://github.com/mongodb-js/charts-embed-sdk/tree/master/examples/click-events-basic) sample. To learn about other properties you can use to customise your charts, please refer to the [API documentation](https://www.npmjs.com/package/@mongodb-js/charts-embed-dom).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When you embed charts using the Embedding SDK, you ae able to customise the embedded charts by setting attributes. One of these is `setHighlight()`, which lets you emphasise part of your charts to attract attention. This feature adds a layer of richness to interactive charts, and can be used to show relationships between charts. To learn the basics of interactive charts, see the [click events](https://github.com/mongodb-js/charts-embed-sdk/tree/master/examples/click-events-basic) sample. To learn about other properties you can use to customise your charts, please refer to the [API documentation](https://www.npmjs.com/package/@mongodb-js/charts-embed-dom).
When you embed charts using the Embedding SDK, you are able to customise the embedded charts by setting attributes. One of these is `setHighlight()`, which lets you emphasise part of your charts to attract attention. This feature adds a layer of richness to interactive charts, and can be used to show relationships between charts. To learn the basics of interactive charts, see the [click events](https://github.com/mongodb-js/charts-embed-sdk/tree/master/examples/click-events-basic) sample. To learn about other properties you can use to customise your charts, please refer to the [API documentation](https://www.npmjs.com/package/@mongodb-js/charts-embed-dom).

Copy link
Contributor

@kristinamongo kristinamongo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fantastic and I ❤️ the predefined highlighting filter🔥 🔥 🔥 Thank you for adding this example app. 💯

@jarjee jarjee merged commit d761e9b into master Aug 26, 2021
@kristinamongo kristinamongo deleted the feat/programmatic-highlighting branch August 26, 2021 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants