control of the numerical accuracy on the axis of a line chart

Hi people.

A simple thing, that I can't get to occur. I have an application that draws two digital axis in a chart. I need to check the accuracy of the displayed values on the axis; That is, if the value is floating point, for example, I want to only display two decimal places as in '%2 .2f' if it were C or something like. I can't understand how to do this in JavaFX (I use 2.2). I saw the "setTickLabelFormatter", but I don't understand how to use it. He wants an instance of a "stringConverter' and I don't understand how to use it. someone can give me a detailed example of the use of setTicklabelFormatter to define, say, 2.2f precision?

Thank you.

Something like this should work:

        yAxis.setTickLabelFormatter(new StringConverter() {

               @Override
               public Number fromString(String string) {
                    return Double.parseDouble(string);
               }

               @Override
               public String toString(Number value) {
                    return String.format("%2.2f", value.doubleValue());
               }

        });

Tags: Java

Similar Questions

  • Change the name of the axis Y in a chart

    Hello

    I am relatively new to view lab and want to know hoe I can change the name of the axis y with pragmatism

    whenever I have place a waveform graph the x and the axis are called default 'time' and 'amplitude '.

    but in my program I want to allow the user to pragmatically change the name of these axes especially the y-axis.

    is it possible to do? Ive tried to create the reference and pass to a knot of property... but I am unable to find the right property that will run the task I want to...

    Help, please...

    Thank you very much in adavnce

    Hi Avisnash,

    You can use the node name property of the y-axis to that effect. Check the attached vi.

    Kind regards

    Amine31

    (Give congratulations to good answers and Mark as a Solution If your problem is resolved)

  • help in hiding and showing the series in a line chart

    Hello world

    I have a line chart with 8 sets of data and I would have checkboxes to show and hide each series, if the graph is not too busy.

    How can I do this?

    Thank you
    Ryan

    Hello Ryan,

    If you use the library AnyChart which is provided by default in the APEX of the following links may help:

    [url http://www.anychart.com/products/anychart/docs/users-guide/livesamples/js-series/index.html] Adding, deleting, changing, hiding and showing Series - AnyChart JavaScript interactivity

    {: identifier of the thread = 2201947}

    I hope that helps!
    Kind regards
    Kiran

  • Control of the Studio development plots Sun chart

    I paint a chart by using the graphic Studio development command and the following code:

    NationalInstruments.Controls.Plot insertionLossPlot = new NationalInstruments.Controls.Plot ();
    NationalInstruments.Controls.Rendering.LinePlotRenderer insertionLossLinePlotRenderer = new NationalInstruments.Controls.Rendering.LinePlotRenderer ();
    insertionLossLinePlotRenderer.Stroke = Brushes.Magenta;
    insertionLossPlot.Renderer = insertionLossLinePlotRenderer;

    NationalInstruments.Controls.Plot returnLossPlot = new NationalInstruments.Controls.Plot ();
    NationalInstruments.Controls.Rendering.LinePlotRenderer returnLossLinePlotRenderer = new NationalInstruments.Controls.Rendering.LinePlotRenderer ();
    returnLossLinePlotRenderer.Stroke = Brushes.Green;
    returnLossPlot.Renderer = returnLossLinePlotRenderer;

    This. NationalInstrumentsGraph.Plots.Clear ();
    This. NationalInstrumentsGraph.Plots.Add (insertionLossPlot);
    This. NationalInstrumentsGraph.Plots.Add (returnLossPlot);

    This. NationalInstrumentsGraph.Data.Clear ();
    This. NationalInstrumentsGraph.Data.Add (insertionLossPoints);
    This. NationalInstrumentsGraph.Data.Add (returnLossPoints);

    The plots are drawn correctly, but after about 2 seconds, the lines move slightly and their brightness seems to slightly reduce.

    I don't see all the graphic properties which would explain this.

    Can someone explain this?

    From your description, it seems that you draw a large amount of data for the chart at the same time. In the default RenderMode configuration of Auto , the graph allows to detect large, as default data Raster mode. After a short time-out, the graph will see that data are not updated with high frequency and pass automatically to the Vector , who uses anti-aliasing can give diagonal lines and a lighter side.

    To avoid the automatic ignition, just set RenderMode to one value other than Auto .

  • Change the orientation of the name axis Y in a chart

    Hi all!

    I'm trying to change the orientation of the name of the axis Y in a chart.

    I could not find nor all the attributes which allows me to do this easily, or anything on the forum about this.

    Any ideas?

    Thanks in advance

    ZB

    Dear Wolfgang,

    First of all, thank you very much for your quick response.

    I looked for the ability to change the orientation of the axis of the NAME Y in the parameters of the axis, but I couldn't find anything (maybe it is because I do not use CVI v2009 but v9.0.0 CVI)

    In any case, a previous message on this forum suggested that the problem could come from the police that I used for my chart

    http://digital.NI.com/public.nsf/allkb/9C01B48630BC23F48625731C006D1165

    .. .and BINGO!

    I change the font of NIEditor to NIDialogMetaFont and my NAME has been automatically placed vertically the axis Y.

    All the best

    ZB

  • Is it possible for a line chart display curved lines between the points?

    We have a demand interesting to build a line chart in OBIEE, where the points on the graph are connected by curved lines instead of the normal straights. The best way to describe it would be "serpentine". I saw this in a Cognos report, but I do not know if OBIEE for this. Maybe a setting in line.pcxml? Any ideas?

    Currently, we do not provide the organizational chart. Both options, you have to connect the dots in a line chart are either via a straight line or a curve of the step. A curved line would essentially be a form of a spline, with suitable smoothing algorithms.

    Rgds,
    Afonso
    BI product management

  • Internet Explorer 8 and cannot run the AXIS ActiveX camera controls in streaming videos

    While I can't verify this with certainty, it seems that since I upgraded to IE 8, I can run no longer videos using the camera AXIS ActiveX controls.  I get the error: "The AXIS ActiveX Camera Control, which allows to display live image streams in Microsoft Internet Explorer, can not be saved on your computer."  I checked under Tools-> Internet Options-> click the Security tab and then activated or has requested to be invited to everything related to the ActiveX and it does not clear the problem.  Oh and I'm running on XP.

    Thank you.

    Hi nbundy,

    Thank you for visiting the website of Microsoft Windows Vista Community. The question you have posted is related to XP and would be better suited to the XP community. Please visit the link below to find a community that will provide the support you want.

    Forum XP

    http://social.technet.Microsoft.com/forums/en-us/category/windowsxpitpro/

    Matt Hudson
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Are there keyboard shortcuts for the axis of the world / Local axis controls?

    ... because I can not find them, and I use them a lot now.

    Once you get the hang of the use of the Orientation to control cameras (well - to control a null that your camera related to), you can make beautiful crane movements / orbit. They end up feeling more pleasant that the help of rotations Euler as AE calcs them with quaternions, my camera follows 'Grand circle' paths rather than separately by interpolation of axes. Sometimes the effect is subtle, but sometimes it is a huge improvement - particularly if your camera moves near one of the poles.

    But the Orientation is difficult to manage in the settings - it's much easier to hit 'W' and use of the manipulator in the shape of cross on the screen. If I have a typical camera-> setup cameraRotNull, for orbiting around an object, I'll always want to control the height of my camera directing the series zero his local X axis, but the rotation of the camera around the object must be done using the axis Y in the world.

    So a lot of switching between local and global.

    Any help?

    (I'm on a Mac, AE CC 2015)

    Long answer: No.

    Mylenium

  • How the control number of the minorticks between two tick marks of the axis?

    Hi guys,.

    I want to draw a number of minor ticks between two graduations of the vertical axis of the column chart based on user input.

    ex: If user provides 2 there are two minor ticks between two tick marks on the axis.

    Thanks in advance.

    From what I can tell with sleeping with her, minorInterval value divides the vertical County to get the appropriate number of ticks between each interval.

    
    
    

    In the example above, I have the interval to 10 and when I put the minorInterval at 2, then I get 5 ticks.  The first tick is the interval and then followed by 4 more ticks.

    In your example, in order for me to see 2 ticks between intervals, then, I must assign the minorInterval 3.5 .

    10 / 3.5 = 3 (2 ticks)

    The forumla should be something like:

    ViewableTicks = interval / (selected ticks + 1);

    So, if I created a drop down list with 1-9 ticks (because 0 does not work if you are showing minor ticks), then when the option is changed, I calculate the value for minor ticks and set the component LinearAxis (countAxis) this new value.

    protected function tickViewList_changeHandler(event:IndexChangeEvent):void
    {
     var tickCount:int = tickViewList.selectedItem;
     var tickView:Number = countAxis.interval / (tickCount + 1);
     countAxis.minorInterval = tickView;
    }
    

    I created a blog post showing my example.

    Post edited by: DeanLoganBH - add link post blog with photos of example

  • WPF, is there a way to link the label of the axis

    I have this XAML and I was wondering if there is a way to change the label of the axis of GHz to something else programmatically.  I tried the usual link and it did not work.

    It is just easier to use a TextBox control on the same place?

    Thank you!

                                








    With the help of Content="{Binding LabelX}" in the LabelTemplate won't work if Label is defined on an object with a property called LabelX . I think that what you want is something like this:

    Label="{Binding LabelX}">

            

                

                    Content="{Binding}" />

                

            

        

  • ScatterGraph does not manually change the axis to execution interval

    I use the ScatterGraph and the WaveFormGraph in VS2010 Winforms application.  I have the interaction mode axes set to EditRange.  The WaveFormGraph command allows to edit the axis range by clicking on the end of the axis labels and modify them.  ScatterGraph control is not even though the documentation I've read says it should.  The mode of the axis does not seem be the question that I have changed between fixed and AutoScaleLoose (which is not the choice to have everything showing changing data, if you want your range entered manually to maintain).  I tried a new project with a ScatterGraph control with the default settings and checked that it does not change the axis interval.  Is there a way to change the settings to allow you to manually edit a ScatterGraph range in this way when running?

    Thank you!

    Hi Lybro,

    You have activated the "EditRange" of the graphical object of point clouds InteractionMode? There are two places that the mode of interaction is defined, one for the axis and the other for the scatter chart, both must be enabled for writing at work. I just tested this with Measurement Studio 2013 and it works. Let me know if it helps.

    Kind regards

    Kevin

  • Change the values on the axis are in text

    Hi all

    I'm tracing a few weather data, I took a Web site. A detail that I extract from the Web site is rolling of wind. Extracting value is very good, and I find myself with a value between 0 and 360, which corresponds to a direction. I can trace it on a chart compared to the time I acquired data. One thing I would do is to create a second scale of y and change the numeric values for text labels to describe the meaning, so I N, NNE, DON'T, etc. as well as the value of the azimuth in degrees. I cannot find a way to add text to the second ladder, I missed something or it's a bit complicated to do? I have attached a picture to show what I mean.

    If I missed a post on the forum about this, excuse me, please paste the link in a comment below.

    Thank you very much

    Joe

    Pack them salvation.

    I cannot find a way to add text to the second ladder, I missed something or it's a bit complicated to do?

    No, you didn't miss anything. You cannot display text in the y-axis.

    But you can hide the axis values there and place a string indicator in the place!

  • Control of the expression / Slider control works with the percentage?

    For example, I want to do something with keyframes, so opted to use "regulator toslide ," but is now defined by the "cursor", if I put the wiggleexpression (2.5) and place 2 on the regulator to behind the scenes, knowing that the value will be replaced by the value of "slider" so in the case of the control slide was "10". , would look like this: wiggle (10.5)

    But I want to know is if the control of the expression of origin by a percentage and not a replaced, for the value of the slider control.

    Thank you!

    If the amount of your max value is set, then by creating the cursor to drive the percentage of this number requires a few simple calculations.

    Degree of accuracy desired percentage to be hover would require a small change that in mathematics.

    This example allows you to animate a percentage of '2' frequency (maximum value) in agitation, but allows the range '5 ': stay

    mV = 2; maximum value

    PERC = (effect ("Slider Control")("Slider")/100);  makes a percentage since the slider value by using 0-100

    Wiggle(MV*PERC,5)

    explanation:

    There are several ways to do so.

    The slider is unlimited, so you can define OTHER rules in your expression, but to keep it simple:

    You must multiply your maximum value of your "perc."

    However, we want to transform the number 'perc' in a fraction.

    A simple way is to divide the amount of cursor by 100.

    Multiply your max value with the result of your cursor (/ 100) and you have your percentage.

    (* You can use fractional numbers to animate instead of this, but the cursor is easier to control in this way.)

  • Empty drop down list - planning - Web Forms - Dimensions in the axis of the Page

    Hello

    The drop-down menu that appears when you click on one of the dimension in the axis of the web forms page appears empty. The problem is unique to the single dimension when used with Alias Web form that a single application a plan type and a single instance. The special dimension has more than 1,500 members of level zero and has a seven-digit code and description of words 2 to 5 in the alias.

    I tried to rebuild the shape / LCM for instance different but nothing has worked. I think that this could be attributed to the problem in the JavaScript for menu drop-down. But I have no knowledge on javascripts so abstained.

    Feel free to ask all the questions and thanks in advance.

    Thank you

    RJ

    Finally with the help of the Oracle, I found the problem. The problem was some control characters in the names of aliases which are not visible in the user interface. Somehow these characters in the name of the alias has been added during the transfer files on the remote server or the load control metadata.

    changed ODI reloaded code execution on the target data store, metadata, and the problem is solved.

    See you soon.

  • Quarter playback controls when the 3rd party app plays

    When a 3rd party application plays on my iPhone (Audible, Castro,...), my Apple Watch does not show the playback controls to it. Wait for the watch to show the same controls as the control center on my iPhone. But it shows a Play button and gray < <>> / buttons. Volume controls work well and when I press the play button, the 3rd party app is dimmed and the iOS app music begins to play.

    I'm doing something wrong?

    iPhone 6 s more - iOS 10.0.1

    Apple Watch series 2 - Watch OS 3.0

    Hello

    Audible or Castro iPhone applications currently include an app for Apple Watch:

    I suggest that you see the respective developers support resources and/or consult the developers directly on the contribution of functionlity for their applications on Apple Watch:

Maybe you are looking for