Secondary axis on the WPF chart

Hello

I'm tracing a secondary value axis on my WPF chart. I have a graphic linked to a table of AnalogWaveform of objects that I change during execution. This table can be different sizes depending on the user's selection, however assume that there are two types of data to the chart.

I would like to match a data type of my main axis and the other guy to my axis is secondary. For example, I have four AnalogWaveform opposes the plot, two of whom are in Hz (primary) and the other two in Volts (secondary).

According to the documentation, I need an additional of element under my definition of . What I have is:

         

























This adds a second value axis to the left of my main axis. What I need is for this axis which will be located to the right of my chart and somehow to draw each AnalogWaveform on the right y-axis.

I build my locations in the code as follows:


_graph. Plots.Clear ();

RawData is my AnalogWaveform[], built in advance based on a response from the server
foreach (AnalogWaveform waveform in RawData)
{
If (waveform! = null)
{
field = new plot (waveform. ChannelName);
parcel of land. DataContext = waveform;

plots. Add (Plot); plots is a simple list
}
}

_graph. Plots.AddRange (studs); Add locations to graph

_legend. ItemsSource = plots. Add locations to the legend

Any help would be appreciated on how to do it.

Thanks in advance.

To position your second Y axis across the graph, set the Location property on the axis of Far .

To associate a plot to a default axis, set the VerticalScale property on the ground in the axis value is appropriate.

Tags: NI Software

Similar Questions

  • Hide the first and the last Division in the WPF chart axis

    I want to hide the default marker of the first and the last major division in an axis of a chart of WPF. I tried to extend RangeDivisionsMode and define my own class object to the MajorDivisions.Mode property on the axis. But even when I returns a list empty in RangeDivisionsMode.GetDivisions(...), the first and the last marker is drawn.

    Thanks in advance, Jonas

    The minimum and maximum labels are transmitted separately when displaying a scale (even if technical RangeDivisionsMode custom can be used for the minor divisions).

    There is no direct configuration option to hide extreme labels, but you can achieve this effect by initializing the LabelPresenter property on MajorDivisions by a custom implementation:

    class CustomFormatter : GeneralValueFormatter {

            protected override UIElement VisualizeCore( TData value, ValuePresenterArgs args, UIElement existingVisual ) {

                UIElement element = base.VisualizeCore( value, args, existingVisual );

    var axis = (Axis)args.Context;

                Range range = axis.Range;

                var comparer = range.Comparer;

                bool isExtreme =

                       comparer.Compare( range.Minimum, value ) == 0

                    || comparer.Compare( range.Maximum, value ) == 0;

                element.Opacity = isExtreme ? 0.0 : 1.0;

    return element;

            }

        }

  • Draw a line connecting two points in the WPF chart

    I'm trying to understand the best way to draw a line between two existing points on my graph in WPF.  At first, I thought I had it works fine; I just added another parcel to my graph then given exactly two points for rendering.  But I quickly noticed that the app has become surprisingly slow and CPU was quite high (adding other plots does not affect the use of the CPU as long as they have a complete set of points (?)).  He wants me if I looked at using the DataToScreen method on the chart but I can't know what the parameters are.  The second parameter is simply an IList that tells me a lot.  This seems to be the method I want to use for the coordinates of a point on the graph screen.

    No one knows what the second parameter is supposed to be for the DataToScreen method?  Everything I tried throws an Exception of Argument.

    Thank you
    Dan

    DataToScreenwill return a screen coordinate in the plot area of a chart of the value of the raw data horizontal and vertical in the given list. The parameter value is a IList for compatibility with other methods of graphical query such as FindNearestValue , return IList values containing raw data.

    A concrete example, say you had a graphical configuration with a wide horizontal axis ranging from 0 to 100 and a vertical axis double precision ranging from 10 to 20:


            
                
                
            
        

    To get the screen coordinates of the value at the center of the two axes, you can call:

    graph.DataToScreen(plot, new object[] { 50, 15.0 })

    Note that the raw data values corresponding to the type of axes (horizontal AxisInt32 returns the integer 50 and vertical AxisDouble Gets the value 15.0 ).

    You also mentioned a performance issue where "adding other plots does not affect the CPU so that they have a complete set of points". I did a simple test app that adds an array of two points of a chart on each key (for example graph.Data.Add(new[] { new Point(x1, y1), new Point(x2, y2) }); ), but could not reproduce the problem you saw. Could you share the code, you use to draw the connection line?

  • How to add a secondary axis in a chart excel with labwindowsCVI?

    Hello
    I am currently working on LabWindowsCVI and I treat my data in excel files. I use ExcelReport and Excel2000 instruments to build my data tables and my chart. Track, I use this function:
    ExcelRpt_ChartWizard (chartsheetHandle, ExcelWorksheetHandle, "A1: C619" ExRConst_XYScatterSmoothNoMarkers 0, ExRConst_Columns, 1, 1, 1, ' consumer mobile platform ","TIME (sec)"," current / voltage (in V & A) ", NULL);
     
    In this configuration, column A is X axis and B & C (Y axis) my blood given respective & current.
    My graphics are drawn correctly, but I find a problem, 2 curves are on the main axis and I want a trace on the main axis and the other on the secondary axis. I can not to display a secondary axis.
    This action is possible with LabwindowsCVI function and if so, can you tell me which work?
    Thank you in advance,
    Nicolas

    Thanks a lot dcl9000.

    I wrote these functions after that to trace my chart and the secondary axis appears .  It was necessary to create a second graphic handle to separate both my curve. Thanks to you, now I know a new function of Excel and I think that I will need in the future.

    Kind regards

    Nicolas

  • 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

  • XYGraph secondary axis

    Problem very simply: I have some curves on a single XYGraph. How can I make the axis y for one of the curves a secondary axis?

    See the attached VI.

    I give it a try, but I get error of invalid property value. My unerstanding is Plot.YScaleIdx = 0 for main y axis and 1 for the secondary value axis. Is it not the case?

    You need to duplicate the scale until you can write to her.

    I did it manually, then your code worked without error.  I don't know if there is a programmatic way to reproduce the scale.

    EDIT: According to this http://forums.ni.com/t5/LabVIEW/how-to-show-duplicate-scale-programatically-on-chart-indicator/m-p/1... you cannot programmatically create balance.

  • Accuracy of the Gantt chart

    I use Apex on top of Oracle 11.2.0.3 4.2.1.00.08

    I want to set up a gantt chart resource with minutes on the axis instead of from the default.
    I tried to introduce a key xml < anygantt > < settings > < sequence > < scale > < interval > < type interval = interval 'Hour' (or 'Minute') = 1 > without success.
    What happens then is an unending "Loading Data"
    The number of lines configured should be sufficient. When the XML to defalult reset all data are displayed.

    When checking a little more away all graphics date information truncated to the part of the day of the date indication.
    So, how can I configure the Gantt chart in order to have the minutes below the limit.
    Worms and from the db column is of type DATE MM and SS.

    BR

    Hi BR,

    Looking at the XML table you have included in your message, it may or may not be a typo, but the figure is expected to be wrapped in quotes i.e.

     
    

    Without the quotes around the number 1, you will certainly get the "Loading Data" message. If that ever happens, the best thing to do is to run your page in debug mode and click on the "View XML" link which will appear under your graph. Cllicking on the link displays the XML file associated with your chart. However, it will show also any error was captured during the generation of the XML table. This could be useful, especially when you work with custom XML where it is very easy to misplace tags or omit the quotation marks.

    Regarding the time for your Gantt chart information, in order to generate Gantt charts when the accurate time information are used, then the graphical query must make reference to
    TIMESTAMP columns. If you take a look at the example in my sample application (see http://apex.oracle.com/pls/apex/f?p=36648:83) it might be useful.)

    Let me know how you go.

    Kind regards
    Hilary

  • Measure of the kind on the bar chart

    Hello

    I use OBIEE 11.1.1.6 BP1 and I can't seem to be able to sort out a bar by my measure value chart. I created a simple report with the field Sample Sales just to illustrate my problem. I chose year, Product Name and #Orders as my measure and then added a sort on the measurement column.

    If I use my measurement in the vertical axis, the year on the horizontal axis and the product in color vary by section sorting is not applied. The sort is applied only if I place the two columns of the dimension on the horizontal axis (see the link to the picture). Any reason, why this does not work the way I want?

    https://www.dropbox.com/s/7sphhvq34knwh29/sort%20bar%20chart.jpg

    Thank you
    Pedro

    Hi Pedro,

    Sort feature is different in 11g to 10 g. It's the declaration of Oracle

    "The measurement-based kinds are not implemented completely for graphic and dynamic crosstabs in 11 g. Graphics do not provide UI elements to emulate sorts focused on the measure. There is a restriction in 11 g, and you can use the workarounds for the problems of sort. »

    It seems that you have recently upgraded from 10 g. Before you discover other surprises in 11g UI, look in the "Possible changes after upgrade" section in the upgrade guide.

    http://docs.Oracle.com/CD/E21764_01/bi.1111/e16452/apndx_ui_chngs.htm

    Kind regards
    DpKa

  • How can I use axis layer against the axis of the world to animate?

    Hi all

    I'm open to other ways to address the issue.

    I am trying to create a sphere using multiple images. Say, 200 images, arranged in 3d space, so they face outward and together form a large sphere. Pretty standard thing (like the sphere glowing apps blue droid in android ads, like this).

    I used red giant PlaneSpace quickly take a sphere. I want to "explode" the sphere for all images to move away from the centre of spheres, but in a staggered and random way rather than all at once.

    I thought it would be easier I see each orientation layers changed each axis of layers. So the layers of the z-axis of the Center points.

    Example:

    ex.jpg

    I tried to use a simple linear expression to update the Z axis over a period of 20 seconds to its current position minus 2000, like this:

    AMT = linear (time, index, index + 20, position [2], [2] position - 2000);
    Transform.position = [position [0], [1] position, amt];

    This updates the position of the z axis, but it is based on the world axis (or axis of the model), not the axis of layers. The axis of layer, I want to talk about is the widget of the axis that appears when you select a 3d layer and the axis 3 widget to see red/green/blue appears.

    How can I get the expression to use the axis layers rather than the world?

    Is there another approach to this? I'm certainly not up-to-date on 3d trig enough to write a formula to chart a course far from a specific 3d point. If all goes well, there is a simple way to do this that I forgot.

    I will add that I have attach all 200 pictures to a null value, scaled to null, and it grows not all photos now. I also added a reverse scale expression to keep them the same size they were initially instead of scaling upwards with a null value. However, I really want to blow way random and not "both" and I need to get out of the null concept for this scaling access to each photo.

    Thank you!

    Unplug the layers of the null value and try this:

    AMT = linear (time, index, index + 20, 0, -2000);
    toWorldVec ([0,0,1]) + value * amt

    Dan

  • Can I set up a secondary monitor to the HD on my iMac mid 2011

    Can I set up a secondary monitor to the HD on my iMac mid-2011 with no problems. I cannot afford to upgrade to the new iMac 27-inch and wanted to update my monitor.

    Is this possible on the Mid 2011 iMac?

    Yes.

    Your best option is to choose a good monitor that has Display Port or DVI input and shy away from those who only have HDMI and VGA input.

    For a display Port monitor you will need a Mini Display Port to Display Port cable if it is not provided with the monitor.

    For a DVI monitor you will need to a Mini DisplayPort to DVI adapter and a DVI cable.

  • Adobe Flash crash when displaying the stock charts out-Google Finance

    Running the latest version of the flash Shockwave Flash version 11.1.102.55 and 8.01 Firefox plugin and Flash keeps crashing trying to produce the stock chart in Google finance. Problem started when the update to Firefox version 8.01.

    Just tried again once and google must have dome something to their website - their stock charts are now working as expected.
    Thanks for all your help - B

  • 3.6.3, cannot drag and drop tabs (the iconic chart moves but disappears when released), also can not 'tab.

    3.6.3, I can not drag and drop tabs (the iconic chart moves but disappears when released), also I can not "select" tab to change the status of parent/child etc.

    This has happened

    Each time Firefox opened

    == installation

    Hello

    I had the same problem (impossible to drag-and - drop) and it was restored when I disabled the addon "tab mix more.

  • How to move toward the front of the indicator chart of selected waveform

    Hello. I would like to put a number of indicators on the front (that's about 20 small flags or mauby more).

    When the user select one of them, the indicator is resized to the entire façade. The problem is that a number of small indicators appears as one resized was beneath them. I've looked everywhere and since 2010 (some people had the same problem) no solution has been found. I think property node with passage to the Front option has been added to labview (sp1 actualy 2015) - the problem, it is since 2010 - but unfortunately I can not find. Is there a solution to my problem?

    You could have a tab with hidden tab page selector. Have your small graphics on the first page and a single large graphic on the second page. When the user selects a small graphic in the first page, you programmatically move to the second page and feed the data required in the great chart. In this way it will look like magnified the selected chart. You can have a button of the left arrow on the second tab page that directs the user to the first page...

  • How to define the axis of the source of the meter

    I'm programming using the PCI-6251 DAQ with the Commission BNC2110 and Labview 7.1 card.

    I just want to write a program to count frequencies of two signals from outside. In the measurement and automation, I could use the edge count by selecting the source edge as Dev1/PFI0 etc. But in the vi window, how to change the axis of the ctr0 source to say PFI0 or PFI1 or something else?

    And the strategy of my program is correct or not? Because later, I want to use an internal counter to count for my external signal frequencies.

    Use the channel property node and the Jack for the meter.

  • Insert the 3D chart into a PowerPoint presentation

    Hello world!

    I would like to insert a graphic 3D object generated with LV in a Powerpoint document. So far, the copy of a static image isn't a problem, but I would like to power pan/rotate the 3D chart. Any idea?...

    Thanks for your help!

    CC

    In LabVIEW, right-click on your 3-d chart and choose CW3DGraph > Style export to export the graphic style to a file. Then go into powerpoint and choose View > Toolbars > Control Toolbox. On the right of the low side is the area for additional controls. Select this option and select the CWGraph3D object. Drag a box on the powerpoint slide and the graphical object should appear. Right-click on the object and go to control CW3DGraph (National Instruments) and select Style Import and select the style that you previously exported. When you run your slide show, you will have the opportunity to rotate/etc that you have imported style.

    Marcus

Maybe you are looking for

  • 2nd HD is not appear. Computer laptop dv7-1132nr

    Hello I just installed a 2nd HDD in my DV7-1132nr (equipped with 64-bit vista), it's a Western Digital SATA - 320 GB drive... for some reason, it does not appear as an available drive. However it appears I am reviewed Local disk properties, and it ap

  • Satellite Pro A100 PSAACE - the touchpad buttons do the same action

    Hello I have a problem with my left button touchpad keys. Although the affected software the left click function, he always does the same action as the right button.Drivers and installation of Windows are new. Is this a hardware or a software problem

  • applications using the lock to the top print spooler when trying to print

    I have a printer connected directly to my router and access it via a TCP/IP port. It works with my Windows Vista and Windows 7 computers in Microsoft applications. However, on my Windows XP computer, it will print in Internet Explorer or programs tha

  • The user profile Service failed - all the usual bugs do not work

    I have Windows 7 family on a Lenovo laptop and received the 'User profile on logon Service failed' message when you try to connect.  I have only one profile and that you do not have a backup disk.  There is also no set restore point.  I can access th

  • BlackBerry App question BB protect &amp; BB ID

    Hello everyone, we have a problem with Passport BB, we bought a while ago. The user created BB protect function as well as BB ID 1. Now you are asked BB ID after startup. 2. when we enter valid BB ID and password, the BB is back: "protect the BB serv