cancel
Showing results for 
Search instead for 
Did you mean: 

how to change the data in a chart using slider bar ?

0 Kudos

hi community,

   i have issue, i created one SDK extension slider bar based on that i want to change the data in chart.

my requirement is like, i have month and some measures in a chart  i want to set month in a slider bar if am moving slider according to that values should be change in chart.

Accepted Solutions (0)

Answers (2)

Answers (2)

david_stocker
Advisor
Advisor
0 Kudos

You could try the following.

Pull the month dimension values into an object, where each dimension value is assigned to a "numeric" (air quotes, actually a string) attribute.

Something along the lines of:


var myMonths = new Object();

myMonths["0"] = <month0_key>;

myMonths["1"] = <month1_key>;

Then, you assign the range slider a set of numeric values, from 0 to n, where n is the last attribute in myMonths.  When the user changes the slider values and the OnChange is fired, use the numeric values of the current slider positions to get the appropriate range filter values out of myMonths.

I've not tried this yet, so I don't yet know what pitfalls you'd run into.

Cheers,

Dave

XaviPolo
Active Contributor
0 Kudos

Range Slider needs two values to define maximum/minimum interval, and OnChange event can be used to filter chart's datasource.

But in this case, you want to use MONTH dimension values to feed the Range Slider.

if I am not mistaken, you can't get the max and min month using datasource access methods, because it'is a dimension.


I think that you need to allow your slider component to access datasource and processing the dimension data you can get MAX and MIN. BUT BE AWARE that if you use the same datasource in chart and slider, when you filter the datasource, your slider will get only filtered months.

Regards,

Xavier Polo