org-scn-design-studio-community / sdkpackage

SDK Package of SCN Design Studio Community
Apache License 2.0
32 stars 29 forks source link

How to modify Date Slider component to single slider #171

Open misdashboards opened 7 years ago

misdashboards commented 7 years ago

I am trying to convert one of the old dashboards that I developed in Xcelsius to Design Studio. One of the metrics require the use of a slider. I downloaded the SCN SDK version 3.0 and tried to use the Date Slider; however, I am not sure how I can change the component to only use one slider instead of two. I was hoping to get some tips or advice on how to do that.

Here is what I am trying to do: The metric has three dimensions which allows the user to drill down on three levels. The first two dimensions use drop-down boxes as filters, and the third dimension is a slider which controls the "monthly view" of the data. There will be a total of 13 units (it starts with 0 and ends in 12, which represents all 12 months in the year). I tried to change the date granularity in the properties from "Day" to "Month", but I'm not sure how to add or change the "Minimum Date" and other properties. I just need to set each unit to abbreviated months (i.e. "OCT", "NOV", "DEC", etc...).

MartinPankraz commented 7 years ago

Hi misdashboards,

I would advise to check the UI5 library for the API and possible options to achieve what you have in mind.

Date Slider test page

API reference

Please not that this component is from the UI5 commons library, which will retire at some point. So if you intend to use m-mode dashboards or plan for the future you will have to check out sap.m.Slider or RangeSlider. You can have a browse here: Slider reference

Apart from SAPUI5 you could also use any other JavaScript library to achieve this. You can learn from our repository components how to load external libraries into your project. In addition to that I published a blog post some time ago on requirejs: blog

Kind regards Martin