ContributionsMost RecentNewest TopicsMost LikesSolutionsRe: Widget Error kundankumar​ it's not officially supported at the moment, since it's marked as 'internal'. But you can try using this and see if it works for you. import { useGetDataSourceFields } from '@sisense/sdk-ui'; import { DataSourceField } from '@sisense/sdk-data'; const CodeExample = () => { const { dataSourceFields } = useGetDataSourceFields({ dataSource: "Sample ECommerce", }); return ( <> {dataSourceFields?.map((field: DataSourceField) => ( <div key={field.table + '-' + field.column}> {field.table}.{field.column} : {field.dimtype} </div> ))} </> ); }; export default CodeExample; Re: Widget Error kundankumar​ for creating filters to apply to Compose SDK components such as charts, queries, widgets and dashboards (via the `filters` prop) you should use the filterFactory from `@sisense/sdk-data` to create the type of filter you want. The documentation and example here should help, plus i'll include some links to other examples .. both creating filters in code, and using the built in UI components (I understand you want to use your own, but being able to interact with the filter tiles, and see the result, might help) Simplest example of creating a Filter using code Filter using a UI component (Filter Tile) while also first creating the initial filter in code Multiple filters combined Re: How to pivot my data and get counts based on the min and max date value I haven't fully validated this, but on first glimpse it seems to work (if I understood correctly) For the pivot 'values' you can use a filter within a formula using the syntax documented here On [Days in Date] click 'Edit Filter' to apply a Bottom 1 rank filter on MIN([Days in Date]) Duplicate the value for "End Date", and change the filter to be Top 1 rank filter on MAX([Days in Date]) Check your numbers match what you expect 😀 Re: Widget Error kundankumar​ it looks like your code is quite complicated, and trying to handle things that should not need to be handled (like fetching things directly from our REST API, manipulating JAQL, filters etc) If you want to embed a dashboard, you can simply use the `DashboardById` component as a child of `SisenseContextProvider` as in this example Similarly, if you just want widgets as individual components and not in a dashboard, then use WidgetById as in this example If you want to first get the dashboard, make some changes and then render the result, you may prefer the `useGetDashboardModel` hook + `Dashboard` component combination as in this example I see you have some of these elements in the code already, but also a lot more other stuff (registerCustomWidget, CustomHistogramWidget, api calls, jaql manipulation etc) which can make it confusing and hard to read / follow. Hopefully the links help to simplify the approach for your intended use case... if you still get stuck using those then please reply back with a cleaner code example, the intended use case, and describe the problem you're facing. Re: How to capture clicked metric value from a Pie Chart using Compose SDK? Hi midhun_e​ WidgetById has a prop named onDataPointClick, it should do what you want. onDataPointClick={(point: DataPoint ) => { console.log('Data Point Clicked:', point.categoryValue); }} Let us know if it works for you Thanks Steve Re: Embedded Dashboard - Failure on load hi nmilya please could you raise a support ticket for this one, since we don't want to ask for further troubleshooting data to be posted in a public forum. if you can include on the ticker a HAR file containing the captured network traffic from the browser while reproducing this problem, that could help the team. If I had to take a wild guess, it would be to ensure you're not also setting ssoEnabled=true on the SisenseContextProvider, but our support team can help futher. Thanks Steve Re: Fetching full dashboard definitions efficiently Hi merrittMelker I think the 3rd option in your list may be your best shot. This is how we do it inside Compose SDK e.g useGetDashboardModel In terms of network traffic efficiency, on the first call you may also include a fields list so only the ones you need for using in your code are returned e.g. /api/v1/dashboards/{dashboardId}?fields=oid,title,datasource,filters Hope that helps Steve Re: Get a list of Datasets in an elasticube with ComposeSDK Hi francoisvv We're hoping to add some things in future that could make some of this easier, but for now if you're using React then you can try using useFetch with /api/datasources/<modelname>/fields/search API Here's a quick / basic example, hope it helps import { useFetch } from "@sisense/sdk-ui"; import { measureFactory } from "@sisense/sdk-data"; const CodeExample = () => { const { data, isLoading, error } = useFetch<unknown, Error>( "api/datasources/Sample%20ECommerce/fields/search", { method: "POST", body: JSON.stringify({ offset: 0, count: 50, }), } ); data && console.log(data); return ( <> {data && data.map((row) => ( <p> Table: {row.table}, Dim: {row.id}, Title: {row.title} </p> ))} </> ); }; export default CodeExample; Re: compose sdk aggregated Table widget expand collapse feature Hi apillai Currently the built in Table components do not have this feature. We encourage submitting this idea to the product feedback section too, there other community members can upvote this idea which helps us prioritize. Meanwhile you could explore using the query API (in react: useExecuteQuery) to get the data and pass to your own visualization component(s). We'll add this to the list of backlog of ideas for the Compose SDK Playground code examples, too. Thanks! Steve Re: Retrieving total count and paginating large datasets with Compose SDK Hi herajapakse Thanks for the detailed post and clear explanation of what you're trying to achieve. Unfortunately, as David mentioned, getting the total row count of a query while only requesting a limited amount of rows is not currently supported. We have investigated the situation and are waiting on an enhancement from the backend API which would enable us to request the total number of rows. Previously it has been suggested you could execute a separate query to count the number of rows instead of the aggregation you want in the paginated results, but it may not be a reliable solution for all cases. For now you can implement paged queries with count and offset, just without the total row count at this time. Steve