Change pace in Slider JavaFx possible? - slider

Maybe, im just blind but i got an slider and i need to know if there is any way to change the paces.
Example:
Slider from 7.5 to 13.0
Pace 0.5
When i set the value in the label, i would like to have something like this:
7.5;
8.0;
8.5
For every movement with the slider i get something like this at this moment:
7.5;
7.51
Tried everything. Any idea?

Set the tick unit for the slider and snap it's value to the ticks.
For the sample values you give in your question:
import javafx.scene.control.Slider;
...
Slider slider = new Slider(7.5, 13, 7.5);
slider.setMajorTickUnit(0.5);
slider.setMinorTickCount(0);
slider.setSnapToTicks(true);
From the Slider setSnapToTicks javadoc:
Indicates whether the value of the Slider should always be aligned with the tick marks. This is honored even if the tick marks are not shown.

Related

#MPAndroidChart How to bypass empty data on StackedBar chart

I am a newbie of android developer and it’s 1st post on stackoverflow.
Thanks for your consideration for any inconvenience caused.
I am using MPAndroidChat for StackedBar Chart.
But StackedBar show empty thing on the some position which no entry data. I like to show only 7 data that I provide. Please refer to below screen shoot. It should be show 7 data on 2018/10/12,2018/10/11....2018/10/6, but it show empty chart many times.
Thanks!
Paddy
[detail]
The 7 BarEntry data as below
And I also follow below issue for timestamp label.
https://github.com/PhilJay/MPAndroidChart/issues/789
[issue screen shot]
screen shot
[BarEntry data]
float x=1050,float[] vals={6.0,5.3333335,6.0}
float x=2490,float[] vals={7.3333335,10.0,6.5}
float x=3930,float[] vals={8.5,7.3333335,8.0}
float x=5370,float[] vals={8.333333,7.6666665,7.8333335}
float x=6810,float[] vals={6.6666665,7.6666665,9.5}
float x=8250,float[] vals={8.833333,6.5,8.5}
float x=9690,float[] vals={8.666667,9.0,6.1666665}
So far I try to workaround by change x is increment by 1 day and use referenceTimestamp and IAxisValueFormatter to correct time by value*24*60*60*1000
code
`this.sdf = new SimpleDateFormat("yyyy/MM/dd");`
`return sdf.format(referenceTimestamp + value*24*60*60*1000);`
BTW, I ever try to add setGranularity(1f), setGranularityEnabled(true), it could hidden labels, but still show empty chart.

Template 10 :Hamburger Panel color not changing

I am creating a uwp app and when i set my xaml code to this
<Controls:HamburgerMenu x:Name="MyHamburgerMenu" HamburgerBackground="#FFD13438"
HamburgerForeground="White"
NavAreaBackground="# FF2B2B2B"
NavButtonBackground="#FFD13438"
SecondarySeparator="White"
NavButtonForeground="White"
LostFocus="MyHamburgerMenu_LostFocus"
DisplayMode="CompactOverlay"
>
Its not changing the color of the Hamburger Panel I have tried all colors.Its still shows the default colors only.
Also even when i change the display mode it still pushes the Title Page.
I dont whats causing the issue.My Template 10 version is v1.1.10.
The issue
To set the background color of the hamburger panel, you have to use the NavAreaBackground dependency property as you did. It should work fine. The problem is the space character between '#' and the hexadecimal value 'FF2B2B2B' in your code. Just remove the space character and it will work : NavAreaBackground="#FF2B2B2B"
In your Shell.xaml.cs file just comment this line HamburgerMenu.RefreshStyles(_settings.AppTheme, true);
It should work.

Limesurvey 3 Answers Slider Bar

I have a slider bar where I have two answer choices along with the choices "No answer" and "I'm unsure" which were modified in Javascript. I wanted to add another answer choice, to have three in total.
Does anyone know how to do this using Limesurvey or Javascript?
Is this the kind of thing you want to do?
I used element type "Multiple numerical input" and changed settings to:
Use slider layout: Yes
Slider minimum value: 0
Slider maximum value: 100
Slider accuracy: 1
Slider initial value: 0
Allow reset the slider: Yes

I want to make a custom slider

I made a simple slider by jcarousellite but i need to make something else:
I need the first visible image to be large what should i do ?
Or how i can select the first visible image in slider?
#option start : number - default is 0 #example $(".carousel").jCarouselLite({
btnNext: ".next",
btnPrev: ".prev",
start: 2 }); #desc You can specify from which item the carousel should start. Remember, the first item in the carousel has a start of 0, and so on.

Widget integrated going out of its own zone

I got a main window (Item) with a 640*480 size.
I integrated a custom widget defined in another qml file, its size is 100*100. This item contains a Pathview that only shows 3 items from a list containing a lot of items.
The thing is that when I add my CustomPathView to my main window at coords (0, 0), the PathView goes to the bottom of my main window, displaying 7/8 items... (?!?)
My CustomPathView.qml file starts with :
Item {
width: 100
height: 100
That's why I really don't understand why it is displaying 8 items...
Did I do something wrong ? Do I have to precise to my CustomPathView that he can't go out of its zone (how ?) ?
Thanks in advance for any help about it !
Just set the clip property to true.