You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Tabs.jsx checks for the existence of a tab key in the d3plus config, which allows you to group visualizations together. But that's overloading the d3plus config with canon props. We should instead handle this explicitly in the interface & database.
function findKey(str, key) {
const regex = new RegExp(`${key}\\:[\\s]*\\"([^\\"]+)\\"`, "g");
const match = regex.exec(str);
if (match) return match[1];
else return match;
}
const titleKeys = ["tab", "type"];
const tabs = visualizations.map((d, i) => {
let title;
for (let x = 0; x < titleKeys.length; x++) {
title = findKey(d.logic, titleKeys[x]);
if (title) break;
}
return title || `Visualization ${i + 1}`;
});
The text was updated successfully, but these errors were encountered:
Currently,
Tabs.jsx
checks for the existence of atab
key in the d3plus config, which allows you to group visualizations together. But that's overloading the d3plus config with canon props. We should instead handle this explicitly in the interface & database.The text was updated successfully, but these errors were encountered: