ContributionsMost RecentNewest TopicsMost LikesSolutionsRe: Help with filterFactory.dateRange Thank you! That worked Help with filterFactory.dateRange I have indicators with a date range filter set up on the Sisense website (see attached image). I am trying to replicate this set up in my UI with the sisense/sdk-data filterFactory.dateRange function, and I am struggling to know how I need to format the dates I pass in to get the same results as the Sisense website. I have tried passing in dates in a "YYYY-MM-DD" format, a "MM/DD/YYYY" format, and a date (new Date()) format. With all of these formats my indicators either return a 0 or N/A value, or values that are way too high (so it seems like the filter is not being applied). What do I need to do differently to get this working? I am trying to filter to show data from the last four weeks. <IndicatorChart {...widget.getChartProps()} filters={[filterFactory.dateRange(DM.SeasonCalendar.CalendarDate, fourWeeksAgoFormattedDate, todayFormattedDate)]} /> SolvedRe: Custom Widget Script Styling Not Coming Through on sdk-ui Chart Component Looks great! The tooltip now matches the standard styling and has the formatting. Thank you Steve! Re: Custom Widget Script Styling Not Coming Through on sdk-ui Chart Component Amazing! Thank you. That worked! Is there a way to apply the same formatting to the value in the "pop-up" that appears when you hover over the data point? The pop-up is showing the unformatted value (see attached image), and I'd like it to show up as the formatted time if possible. Sorting Chart By Different Field Than The One Displayed I have a column chart that is currently displaying events on the x-axis (through an "eventCode field), and they are appearing automatically in descending order by the "total competitors" (displayed on the y-axis). I would like to sort and display the events on the x-axis instead by an "eventKey" field that is also in the Data Model. Is it possible to sort chart axis labels by a different field? Basically, I want to be able to replicate the custom sort configuration (see attachment) that is offered on the Sisense website in compose sdk. SolvedRe: Custom Widget Script Styling Not Coming Through on sdk-ui Chart Component Thanks for continuing to look into this. Yes, I would like to modify the swim time format afterwards for presentation (hours/minutes/seconds/milliseconds is easier to read than just seconds/milliseconds). Here is the script that the widget is currently using to make that presentation formatting change on the Sisense website. Attached is what the result looks like on the Sisense website (& what I would like my compose sdk chart to look like). function convertRawTime(seconds) { var totalSeconds = parseFloat(seconds); // Ensure we're working with a number, maintaining decimals var sign = totalSeconds < 0 ? '-' : ''; var absTotalSeconds = Math.abs(totalSeconds); var minutes = Math.floor(absTotalSeconds / 60); var preciseSeconds = (absTotalSeconds % 60).toFixed(2); // Keeps two decimal places for seconds var formattedTime = (minutes < 10 ? minutes : minutes) + ":" + (preciseSeconds < 10 ? "0" + preciseSeconds : preciseSeconds); return sign + formattedTime; } widget.on("render", function(w) { // Apply the custom formatter to data labels for each series w.queryResult.series.forEach(function(series) { series.dataLabels = { enabled: true, formatter: function() { // Assuming 'y' holds the time in seconds with milliseconds return convertRawTime(this.y); } }; }); //w.refresh() }); Re: Custom Widget Script Styling Not Coming Through on sdk-ui Chart Component Hi Steve, thank you for the information. I've got the return set up from your CodeExample in my code. The data that I am trying to change the format of is on the y-axis, and the existing values are 'calculatedmeasure' (instead of 'datelevel'). Below is what I've come up with so far to work with my data, but I'm not sure how to apply my desired formatting to the 'newVal'? Do you know how I could go about that? Also, I really need to include milliseconds in the desired formatting, so I'm looking to apply a format of HH:mm:ss.00 to the existing ss.00 format. Including a screenshot of what the chart looks like now, without the desired formatting, for context. useEffect(() => { if (widget && !chartProps) { setChartProps(widget.getChartProps()); } if (chartProps && hookEnabled) { const { value } = chartProps.dataOptions as CategoricalChartDataOptions; let newValueList: (MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn)[] = value.map((val: any) => { if (val.column.type === 'calculatedmeasure' || val.column._name === 'Swim Time') { let newVal = val.column as StyledMeasureColumn; } return val; }) setChartProps({ ...chartProps, dataOptions: { ...chartProps.dataOptions, value: newValueList as [MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn] }, }); setHookEnabled(false); } }, [widget, chartProps]) Custom Widget Script Styling Not Coming Through on sdk-ui Chart Component I have a widget where I have edited the script to apply custom formatting (changing the “time” from being displayed in seconds => to minutes & seconds). However, when I display this widget in my React project with the <LineChart {...widget.getChartProps()}/> component from sdk-ui, the custom formatting is not showing up. Is there something special I need to do here to be able to see this custom script styling in the sdk-ui component? I’m not finding any community posts describing this problem or a solution. SolvedRe: Is there a way to change the display order of the data options in a MemberFilterTile? Thank you Ivan! That worked perfectly. Is there also a way to do more complicated sorting (other than ascending and descending)? For example, I have another member tile filter where I am using a "Code Name" as the attribute, but I want the list of "Code Names" to be displayed in ascending order according to the associated "Code Id" (a different attribute in the same interface/dimension as "Code Name"). Is there a way to change the display order of the data options in a MemberFilterTile? I am using the MemberFilterTile component from @sisense/sdk-ui. In some cases, I want the options I'm seeing to be displayed in a different order. Is there a way to change the order in which the options are displayed? For example, in this Competition Year filter I would want the most recent year displayed first, instead of last (DESC instead of ASC order). Solved