Axis label, Legend and Title

Hi,
I am new to DIAdem, I have been struggling for too long so I have decided to ask for some help, I hope someone can help me.
I am writing a script to plot a graph and add axis labels, Legend and Title.
So far I have just been able to draw the graph but no success with the rest. I have found a few answers to my question but none of them work, I don't know why. I am using Diadem 2012 and this is my code:
Can someone tell me how I make the changes I need?
Thanks 
Call PicDelete() 'Deletes all objects. Without this I won't show the curve but with it it deletes the Picloaded previously
Call GraphObjNew("2D-Axis","New_2DAxis") 'Creates a new 2D axis system
Call GraphObjOpen("New_2DAxis") 'Opens the axis object
D2AxisTop =25 'Sets the position
D2AxisBottom =30
D2AxisLeft =20
D2AxisRight =30
Call GraphObjNew("2D-Curve","New_Curve") 'Creates a new curve
Call GraphObjOpen("New_Curve") 'Opens the curve object
D2CCHNX ="Y_Accel" 'Defines the x-channel
D2CCHNY ="Strg_Angle" 'Defines the y-channel
D2CurveColor ="red" 'Defines the curve color
Call GraphObjClose("New_Curve") 'Closes the curve object
Call GraphObjClose("New_2DAxis") 'Closes the axis object
Call Picupdate

Hi Leillo
If you are using DIAdem 2012 you should use the new API. To get a starting point create the layout as you like and then open the corresponding dialog box and press CTRL-Shift-C. Then you have a lot of code in your clipboard, which you can past in you script editor and edit. The contents of the clipboard depends of the dialog box you opened.
You can also select an object in Report and press CTRL-Shift-C
For the new API you will also find tons of small scripts in the help, which shows you how to create labels, legend and titles:
http://zone.ni.com/reference/en-XX/help/370858K-01/reportapi/objects/report_objects_irepaxislabelint...
http://zone.ni.com/reference/en-XX/help/370858K-01/reportapi/objects/report_objects_irepcurvelegendi...
Hope this helps
Winfried

Similar Messages

  • Chart Legend and Title - Can they be Different?

    Hi,
    Pie chart I am displaying has titles as big names like
    Oracle Applications
    Oracle content management etc
    So the space occupied is more. Is there a way to display the titles as abbreviations and the legend as full name?
    Eg:
    Title
    OA
    OCM
    Legend
    OA -Oracle Applications
    OCM - Oracle Content Mgmt

    Hi,
    I don't think that's possible as there is only one label for each slice and that is used in the legend.
    The only alternative would be to provide your own legend underneath the chart region?
    Andy

  • Setting the title font and axis labels in a graph created with the Report Generation Toolkit

    I'm using the LabVIEW Report Generation Toolkit for Microsoft Office to generate Excel worksheets containing plots. Unfortunately, the default font size used in the plots is huge (see attached worksheet). I was able to use Excel Set Graph Font.vi to reduce the size of the axis labels, but there does not appear to be a function to do this to the title and legend. In addition, there does not appear to be a function to set the axis text labels. Before I write my own, has NI released additional functions to perform these tasks?
    Thanks for your help,
    Zach Lerner
    Software Engineer
    OnWafer Technologies, Inc.
    Attachments:
    Test1_-_embedded_graph's_title_and_legend_font_is_huge.xls ‏14 KB

    Hello Zeidan
    The graph title and legend font sizes can be changed by accessing a low level VI (Excel_Insert_Chart.vi) that is part of the excelsub.llb that is located at (C:\Program Files\National Instruments\LabVIEW 8.2\vi.lib\addons\_office). This VI is called dynamically from within the Excel Insert Graph.vi and it uses VI server technology to access the Excel exposed properties. Attached to this post is an image of the block diagram of this VI after I have modified it to set the font sizes of the title and legend to 15. The circles in the image represent what I had to add to accomplish this.
    Best Regards,
    Ayman Kabire
    Attachments:
    Excel_Insert_Chart.JPG ‏99 KB

  • SSRS 2008: how to show an empty chart with legend and x and y axis when no data available

    Hi,
    I am using SSRS 2008, I generated one chart in report designer with the data from Analysis Services (Cube).
    According to the dataset, there is no data returned when I run the query. so when I preview the chart, there is nothing but "no data available" showing on the chart.
    Here I want to know is there any possible to show an empty chart with legend and x and y axis?
    If it is possible, can you tell me how can I make it?
    Best Regards.
    Connie Zhu

    Hi,
    When there is no data, the chart displays the message "no data available". But using a little work around, you can display an empty chart.
    Please find the below steps given to achieve this
    1. Create a new dataset using TSQL to return 1 row of data having the category field and value field set to 0. Add the fields that are necessary for the category fields, series fields and datafields.
       A simple example would be like
       SELECT 'abc' as Category, 0 as Amount
    2. Add a new chart, set the category field to 'Category' and set the data field to Amount from above dataset created in step 1.
    3. In the new chart, right click the category axis and select axis properties, Click on the labels tab, check on
    'Hide axis labels' and then click ok
    4. Now set the Visibility property of both the charts depending on the rows returned from your main dataset
       a. click on your main chart and set its Hidden property to :
    =iif(CountRows("MainDataSet"),false,true) 
       b. click on the new blank chart added and set its Hidden proprety to (the opposite) :
    =iif(CountRows("MainDataSet"),true,false) 
       Note : Please change the dataset name in above expression "MainDataset" to the name of your chart's dataset
    5. Resize the new chart to the same size as your main chart, then position the new chart on the place as the main chart.
       (Note : You can set the position of new chart to be same by copying the location property from the main chart) 
    6. Now run and observe the result. When there are no rows returned by your main dataset, the new chart (the blank chart) should be displayed.
    I've added a working sample of this kind of a report
    here.
    Hope this helps. Please feel free to discuss if you have any questions.
    Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.
    BH

  • How to display axis labels on both x and y-axis of a column chart

    hi,
     i have an urgent requirement of having axis labels on both x and y axis
    In x-axis i got it by sorting order also but in y-axis i'm unable to do
    i need in y-axis ,my column values are L1,L2,L3,----L10these shuold display in y-axis in sorting order and 0 in axis should remain as it is ..........how to take the interval ....? as of now i'm using Auto
    my y-axis values shud look like 0,L1,L2,L3,L4,----L10can anyone get perfect solution
    thanx in advance
    lucky

    Hi Lucky,
    Per my understanding that you want to display the values(Column1) like  "L1,L2,L3....L10" which comes from the "Series group" in the Y-Axis label and keep the row group in "Category group" to
    display in the x-axis and Numric column(1,2,3,4) in the "Value", right?
    Gernerally the lable display in the y-axis is automatically based on the value of the Numric column in the "Value" and it default is numbric labels.
    I have tested on my local environment and in your scenario, i suggest to hide the axis lable of the y-axis and create an tablix to only show the one column contains the values (L1,L2,L3,L3) to display in the place of the hidden y-axis label.
    Detais information about to design an new y-axis label ae below for your reference:
    Create an tablix to display only the row group of the "Column1" ( for the
    Column1 may have duplicate values, you can create parent row group for this column and hide the detail column by setting the "Column Visibility").
    Right click the y-axis to select the "Vertical Axis Properties" and select the "Labels" on the left pane to check the "Hide Axis labels"
    Select the Chart Area and in the properties set value of left=0 under the CustomPosition:
    Set the border style=None for both the Chart and Column1's row group
    Drag the tablix at the position near the hidden y-axis and set the size of both the chart and the tablix to make the value in the tablix row group(Column1) to be align with the y-axis label:
    Right click the "Chart legend" to delete or hide the legend
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • Y Axis label color inherits Pen color and not the default Label color.

    Hi,
    How do I enforce my Y Axis Label to taken the default color specified in the iChart Y-Axis Label Color property instead of picking it from the Pen color selected from the legend? I have a Y-Axis Label called "Total Stock", I can very well change the Label text using method
    document.TestChart.getChartObject().setYAxisLabel("Label from code");
    But when I use a similar
    document.TestChart.getChartObject().setYAxisLabelColor(Color);
    property, I dont see the color change on the screen. But when I get the color using a getYAxisLabelColor() method , the specified input Color is set. My Label in the Y-Axis, always inherits the Pen color of the selected Legend Item, by default the first Item color on Page Load.
    Settings done in the iChart:
    Use Selected Pen for label : Unchecked
    Y Axis Label Color: #000000
    Y Axis Label : Total Stock
    Show Y Axis Label: Checked.
    I appreciate your help,
    Ajitha

    Jeremy,
    I tried the method you mentioned...
    document.TestChart.getChartObject().setYAxisLabelColor(document.TestChart.createColor("#000000"));
    But I still dont see a change in the Label color.
    Another finding is, when I try to alert the Label color on load of the page or during the creation of the applet, I see the label color on the alert is not the pen1color but the default Label color that is set in the display template. I assume that the legend's default selection, overwrites the Label color with the first pen color, but I could not get it with the getYAxisLabelColor() method, even though I see it on the screen.
    Thanks!
    Ajitha

  • Sort Order for Legend and X Axis

    Does anyone know of a way to keep a specific sort order for both the X Axis and the Legend. Both start with numbers and I can get one or the other to sort correcly on the chart but not both. Biggest problem is not all of the legend items are in the first X Axis item so the colors change on the bar graph depending on the legend items in the first X Axis item.

    If you tie bar colors with values, how you will differentiate the bars for different legends.
    Take an example, there are three columns Employee, Location and salery have following values
    Employee Location Salery
    A London 30000
    B Chicago 40000
    C London 50000
    D Chicago 60000
    if we keep Location as Legend and Employee in X Axis, and sort Legend first then Employee. Set Blue for Chicago and Red for London, First two blue bars for A and C will be displayed and then two red bars for B and D will be displayed. Order in X axis will be A,C,B and D. This is not in sequence but this is the way it will and it should work. If you sort by Employee instead if Location, you will get sequence in X axis, but the same colored bars wont be together.
    Thanks
    Swami

  • How to display an image and add axis labels

    Hey everyone,
    I just had a really quick question on a program I created. It uses the vision module to open a file in a new display window, and I would like to add axis to the image simlilar to the picture below (With both the x and y axis labels as pixel, and a cursor which displays the pixel value or intensity). I have attached the simple program, as well as an example of the type of image I would like to open. Thank you for the help! =]
    Attachments:
    TEST1.zip ‏2223 KB

    I've updated the open_img.vi file so that it works with the generic sample picture provided, but the program does not work with the image within the ZIP file from the previous post.
    Or if anyone has any other ideas how to add axis labels to an image, I am by all means open to suggestion. Thanks
    Attachments:
    open_img.vi ‏47 KB
    Water lilies.jpg ‏82 KB

  • X-axis tick marks and labels

    Is there a way I can apply a vertical orientation to the x-axis labels on a chart?

    David,
    This is currently not an option within xMII.  The only workaround would be to butt a html table cell up to it and have the orientation go vertical for the words.
    Regards,
    Erik

  • Is it possible to mix italic and non-italic fonts in an axis label?

    Is it possible to mix italic and non-italic fonts in an axis label in diadem reports?

    No, there is no chance to do this.
    You can only use the "Textobjekt" to mix italic and non-italic fonts.
    Thanks
    Klaus D

  • Captivate 5 export and import legend and sub title issue

    when
    i export a legend and sub title for revisiont and then import it
    i get a white text on withe background why ?
    my font on the project are white is it because of this ?
    Thanks

    let me explain better :-)
    in captivate 5 there a feature for people to export legend and sub title so some one could revise the slide text etc...
    i exprt it in word format but the doc created  we could reed the text cause the text is white on a white background
    any idea ?
    Thanks

  • Can any1 provide me the script file which will genrate the X-axis label and Y-axis label ?

    I have two channels and I want to create a report with 2D axis system. I do not want to drag and drop those two channels into 2D axis system. Can any1 provide me the script by which I can automate the script in such a manner that while running the script only I will get label of X-axis and Y-axis.
    I tried with enabling the script but it was not able to generate X-axis label (Ex.-Time) and Y-axis label (Ex. - Speed)?
    Solved!
    Go to Solution.

    Hi Etn,
    The best way to create a script which manipulates an existing layout via script is using the Ctrl-A function within the parameterization dialogs.
    The following example creates a 2D axis system with one curve and sets the axis labelling explicitly:
    Call PicLoad("Template")                    'New layout
    Call GraphObjNew("2D-Axis","New_2DAxis1")   'Creates a new 2D axis system
    Call GraphObjOpen("New_2DAxis1")            'Opens the axis object
      D2AxisBackColor  ="grey"                  'Sets the background color
      D2AxisTop        =10                      'Sets the position
      D2AxisBottom     =10
      D2AxisLeft       =10
      D2AxisRight      =10
      Call  GraphObjNew("2D-Curve","New_Curve") 'Creates a new curve
      Call GraphObjOpen("New_Curve")            'Opens the curve object
        D2CChnXName      =ChnNameExt(1)         'Defines the x-channel
        D2CChnYName      =ChnNameExt(2)         'Defines the y-channel
        D2CurveColor     ="red"                 'Defines the curve color
      Call GraphObjClose("New_Curve")           'Closes the curve object
      Call GraphObjOpen("2DXAxis1_1")
        D2AxisXTxt       = "@@ChnName(CurrChnNo)@@ [@@ChnDim(CurrChnNo)@@] (My Speed)" ' Defines the x-label
      Call GraphObjClose("2DXAxis1_1")
      Call GraphObjOpen("2DYAxis1_1")
        D2AxisYTxt       = "@@ChnName(CurrChnNo)@@ [@@ChnDim(CurrChnNo)@@] (My Time)" ' Defines the y-label
      Call GraphObjClose("2DYAxis1_1")
    Call GraphObjClose("New_2DAxis1")           'Closes the axis object
    Call PicUpdate()                            'Updates the report
    Christian

  • Can I align the orientatio​n of axis labels in a graph generated with the report generation toolkit (Word)?

    I was wondering how to align the axis labels, i.e. 90 degree or such when creating a graph with the report generation toolkit in word.
    I can do it after the document is created through Format axis title -> alignment but is there a way out of LabVIEW?
    I'd especially like to rotate the y-axis label by 90 degrees.
    Thanks a lot,
    Juergen

    I think he means he can modify it by hand after the report has been generated... But what I want to do is generate the word graph out of labview already with the rotated axis label...
    After I posted this I found out that we can do this with a macro and use it from labview, but unfortunately I don't know VB, or VBA...
    Like this:

  • Stacked bar chart with custom x axis labels

    Is there a way to build this simple chart in labview that I did in Excel?  I need to have many x axis labels and there could be from 5 to 100 of them depending on the data set. 
    Attachments:
    Excel.JPG ‏33 KB

    Hi id,
    Thank you for your response. I hope you are doing well.
    There is an example in the LabVIEW Example Finder (Help>>Find Examples..). It is titled, Stacked Bar Graph. You can search for it if you switch tabs in the Example Finder window. This should help you create a stacked bar graph. To help you with your veritcal axis labels, here is a knowledge base link that details the process:
    How Can I Customize the X-Axis Labels On My LabVIEW Graph/Chart So They Appear Vertically?
    http://digital.ni.com/public.nsf/allkb/1F7C1B089E4​5908E86256C8C0051894A?OpenDocument
    Let me know if these examples help.
    Best regards,
    Anna L
    Applications Engineer
    National Instruments

  • Change the Axis Labels of a Chart

    The Chart-Series are generate through AS (Multiple PlotSeries and 1 LineSeries). I managed to Update the Visuell Areas (in this example to manipulate Vertical Axis (minimum/maximum values to be shown).
    No I have 3 Questions about to manipulate this Chart with AS3:
    I would like to remove nearly all "Ticks" and "Labels" from the Axis. At the End only the min/max and 0-Label-Value on the vertical Axis should be displayed. And on the vertical Axis, I would like only to have the min/max-Label and 100-Value.
    The Chart-Lines (in the Screen above) only 2 Lines should be visible. v-Axis = 100 and x-Axis=0 (just as a Cross over the Chart)
    The Linear Serie (just a Value of a Funktion like x=y*2) should have no Tooltip if you go MouseOver-it. And the Legend of this Serie should not be displayed in the Legend. How can I delete the Legend, and how can I preserve a DataTip over this LineSerie?
    Hopefully you did understand my bad english.
    Thanks for any Tips
    Pawel

    Hi,
    1. IAxis interface have labelFunction (see docs for details and parameters for it). You can check the value to be labeled and return empty string if you don't want to show this value in axis. Axis you get from chart.getAxis(name). But there is not any warranty that always 0 will be shown. You showl implement your own IAxis to show only specific values. (Or search it in internet)
    2. You should remove all these grid lines and create CartasianDataCanvas this lines at 0 and 100 and put it to annotationElements of the chart.
    3. If you don't want to see all data from chart in Legend you should create an array with legend data only from serieses you want to see. Chart has a property legendData from all serieses. You can filter this array or create new array with legendData from serieses you want to see. And set this array as a dataProvider to Legend.
    Hope, this helpful.

Maybe you are looking for

  • AEBS Remote USB AirDisk Access

    First off, it was extremely nice to find out that after shelling out £139 for a router, i also had to shell out another £50 for a compatible modem as the AEBS does not support PPPoA connections, and the bog standard modem does not bridge PPPoA to PPP

  • Polyphony- how many notes can play at one time with the software instrument

    Hello everyone! Is the Polyphony limited in Garageband 3 when playing the software instruments? Is there a setting I should tweak? I noticed this when using the sustain pedal with the grand piano sound.

  • 30'' Display Resolution Misbehaving

    I have a 30" Apple cinema display. I just unhooked everything (which was working fine) and set it up in my new house. The icons are HUGE, the fonts HUGE, etc. I have the preferences set to the highest resolution, I've checked universal access and mag

  • My 2008 iMac 24".

    I have a 2008 iMac 24" OSX 10.6.8: 2.4 GHz IntelCore 2 Duo, 2 GB 667 MHz DDR2 SDRAM. At times (why?) my iMac gets into a mode where the screen fluctuates to becomes much smaller on a darker home screen, and appears with any other open screens (also s

  • Folio Builder 21 not uploading articles

    I'm having major issues with my articles now not always uploading, getting stuck, failing and generally stopping me getting any work done. Are Adobe getting anyone alse with this issue? Cheers Steve