Custom Axis Labeling

Is there an easy way of custom axis labeling? I saw a LabVIEW application that was labeling frequency on a logarithmic scale like:
10Hz, 100Hz, 1kHz, 10kHz, 100kHz, 1MHz, 10MHz
instead of:
10, 100, 1000, 10000, 100000, 1000000, 10000000
Can this be done with the .NET version?
Thanks in advance!
Derek

It sounds like you're looking for engineering formatting with SI units. There is no direct support for this in the Measurement Studio 7.0 version of the graph, but you could get the desired appearance in the axis by setting the axis.MajorDivisions.LabelVisible, axis.MajorDivisions.TickVisible, and axis.MinorDivisions.TickVisible properties to false, then adding custom divisions to the axis.CustomDivisions collection with the appropriate values and labels. This could be done at design-time, but here's some sample code that demonstrates how to do this at run-time:
class MyForm : Form
private NationalInstruments.UI.WindowsForms.WaveformGraph waveformGraph1;
private NationalInstruments.UI.XAxis xAxis1;
private NationalInstruments.UI.YAxis y
Axis1;
private NationalInstruments.UI.WaveformPlot waveformPlot1;
protected override void OnLoad(EventArgs e)
base.OnLoad(e);
xAxis1.MajorDivisions.LabelVisible = false;
xAxis1.MajorDivisions.TickVisible = false;
xAxis1.MinorDivisions.TickVisible = false;
xAxis1.Range = new Range(10, 10000000);
xAxis1.ScaleType = ScaleType.Logarithmic;
xAxis1.CustomDivisions.Add(new AxisCustomDivision(10, "10Hz"));
xAxis1.CustomDivisions.Add(new AxisCustomDivision(100, "100Hz"));
xAxis1.CustomDivisions.Add(new AxisCustomDivision(1000, "1kHz"));
xAxis1.CustomDivisions.Add(new AxisCustomDivision(10000, "10kHz"));
xAxis1.CustomDivisions.Add(new AxisCustomDivision(100000, "100kHz"));
xAxis1.CustomDivisions.Add(new AxisCustomDivision(1000000, "1MHz"));
xAxis1.CustomDivisions.Add(new AxisCustomDivision(10000000, "10MHz"));
// Axis should now appe
ar as specified once the form loads.
- Elton

Similar Messages

  • CR Enterprise - Custom y-axis labels for line chart

    Hi
    I have data with a discrete status (STATUS-1...STATUS-5) per day, like
    Feb 1: STATUS-1
    Feb 2: STATUS-2
    Feb 3: STATUS-2
    Feb 4: STATUS-1
    Feb 30: STATUS-4
    Feb 31: STATUS-1
    This series I'd like to render in a date axis line chart with the daily status ordinals (1-5) on the y-axis.
    Now I wonder how I can label the y-axis ticks with the respective STATUS text instead of the ordinal.
    Unfortunately, the option "Total (Y) Axis/Axis/AxisLabels/Display Label" is disabled due to the value's numeric nature.
    How can I manually overwrite y-axis labels or map them to custom text?
    Thanks. Jens

    HI Jens,
    Have you tried creating a formula and using that in 'Show Values' section of the chart?
    Formula:
    "STATUS-" & {Numeric_field}
    -Abhilash

  • X axis labels for custom group names

    I have a report with one group.  That group has a customized group name field, and the group name is a formula.  When I display the group name in the data section of the report, it displays according to the formula.
    I now need to chart two pieces of data - Primary # of Sales and Secondary # of Sales - for that group so I can compare the two # of sales.  If I make a chart for the Primary # of Sales, and go to the group tab in the Chart Expert and specify "on change of Group By Value (my grouping), show the sum of the Primary # of Sales", the chart displays as desired, and I see the custom group name (formula) as the X axis label.
    But if I go to the Advanced Layout on the Data tab of the Chart expert and specify the Sum of Primary # of Sales AND Sum of Secondary # of Sales in the Show Values section, the X axis label no longer shows the custom group name; it shows the group value.
    Any ideas for how to get it to show the custom group name when I chart two fields of data?
    Thanks in advance!

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • 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

  • Graph X-Axis Labels are appearing in middle for negative y-axis values

    Hi,
    In my Graph Output, the X-Axis Labels are appearing in the middle (where zero is appearing) if the Y-Axis values are negative.
    It's a Line-Graph.
    Can anyone let me know how to move the X-Axis Labels to down?
    I'm using a custom Function module same as 'GFW_PRES_SHOW_MULT' wherein I'm modifying the line colors and appearance. I have to edit in this Function Module to make the X-Axis Labels appear correctly (below) even when there are negative values.
    Please let me know which Parameter of the Class CL_CU_AXIS I've to use.
    Here's the piece of code:
    CALL METHOD graphic_proxy-ref->add_cu_bundle
                EXPORTING
                  port   = if_graphic_proxy=>co_port_chart_y_prim_axis
                  bundle = bundle_axis
                IMPORTING
                  retval = local_retval.
    Thanks & Regards,
    Sowmya

    Hi Sowmya,
    Im Lakshmi working as an ABAP Developer. I have seen your profile in SCN. I saw  your postings about OLE charts.
    I have a requirement to
    1) Output data from an internal table into excel, and
    2) Create a chart from the data in excel
    So far I have been able to export the data using OLE calls, created a chart object,.
    My question:
    1. How to put Data Lables
    2. How to put Data Table under the Chart
    3. How to rename the series names.
    Below is the recorded Macro. I don't know how to convert it to ABAP.
    Sub Macro1()
    ActiveSheet.Shapes.AddChart.Select
    ActiveChart.ChartType = xlColumnClustered
    Application.CutCopyMode = False
    ActiveChart.SetSourceData Source:=Range("B1:E4")
    ActiveChart.SeriesCollection(1).Name = "=Sheet2!$A$2"
    ActiveChart.SeriesCollection(2).Name = "=Sheet2!$A$3"
    ActeChart.SeriesCollection(3).Name = "=Sheet2!$A$4"
    ActiveChart.SetElement (msoElementDataLabelOutSideEnd)
    ActiveChart.SetElement (msoElementDataTableWithLegendKeys)
    End Sub
    I have attached the current output and expected output.
    I have searched about this in google but i could not find any solution for this.
    Your help is greatly appreciated.
    Thanks,
    Lakshmi.

  • Chart Axis: Label Renderer pixel width

    Am using custom label renderer for Chart Axis labels.
    CustomLabelRenderer extends label
    override   public function set data(value:Object):void
     if(value is AxisLabel){
    dataValue = String(value.text);
    else{
    dataValue = String(value);
    I would like to get the Width of the Label component in PIXELS on runtime.
    Can you please tell me how I can get the pixel width of the labels that gets updated when user changes the screen resolution.
    Please let me know ASAP.
    Thanks

    See this example and the related thread:
    http://apex.oracle.com/pls/otn/f?p=31517:222
    Basically, you need to customize the chart XML. That is quite easy to do.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • X-Axis Labels BETWEEN Bars on Histogram?

    Is it possible to put x-axis labels between the bars of a histogram in Numbers?
    It becomes ambiguous in a chart like this (see photo) when the labels are directly below the frequency bar. For instance, looking at the bar above 1, did 14.44% of the weight fall between 0 and 1 or did it fall between 1 and 2?
    Is there a way to put frequency bars between x-axis labels? Maybe a work around is to label the tick-marks themselves?

    Cryptic,
    Your graphic isn't showing. Not necessarily your problem - happens frequently on this discussion site.
    You can label the bars any way you wish, but of course that would be more laborious. You could label them 0-1, 1-2, 2-3, 3-4, etc. in Column A, formatted as text.
    Shifting the labels would require some graphics trickery. You can simply turn off the automatic labels and lay your own custom labels below the category axis, shifted by half a bar interval.
    Jerry

  • IChart x-axis labels

    I'm having some issues with the x-axis labels on an iChart.
    The data I'm trying to display returns a date column I want to use as the x-axis labels. The data returned looks similar to the following:
    MY_DATE | project1 | project2 | project3 .... Where the number of project columns returned can be variable, and the column names change as well based on the project name. The one column always returned in the data is the MY_DATE column.
    The issue I'm having is that it doesn't display the custom labels for the x-axis. I specify "MY_DATE" as the "X-Axis Label Columns", yet it completely ignores it. I've verified in the javascript that the MY_DATE column is specified as the label column, but it doesn't use it.
    I think I discovered what is making it not work, but I cannot figure out why. I have another identical display template, one has a static set of columns returned. I can then specify the "Value Columns" in the "Data Mapping" template category of the display template, as well as the label column "MY_DATE" under the X-axis label columns. In this case it works, but when I take the Data Mapping "Value Columns" away, the dates disappear from the x-axis.
    Does anyone have another way to set custom labels for the x-axis? Or any insight as to why it wouldn't work?

    Austin,
    What do you want the user to see initially?  An empty chart?  Please explain the initial state of the chart and how the user interacts with it.
    1.  Is your query time-sensitive?  This means in the SQL Query you have designated a Date Column or used the SD and ED tokens in a filter expression.  If the query is time-sensitive, the date will automatically map as the X-Axis label.  If it is not time-sensitive, in addition to adding the My_Date to the X-Axis Label Colunms, add it to the X-Axis Value Columns.
    2.  I have found that if I return all the columns in the query, then I simply have to do this to make them show upon some event triggered by the user:
    // assume user chose these columns
    var valCols = "ProjA,ProjB,ProjC";
    var chartObj = document.AreaChart.getChartObject();
    chartObj.setValueColumns(valCols);
    document.AreaChart.updateChart(true);
    3.  I wrote a small transaction using the same query and display template in the Chart action block configuration.  I created a transaction property for inputting the value columns (a comma-separate list) and linked this transaction property (the source property) to the Chart action's ValueColumns property (the desination property).  I then use a PDF Document action and a PDF Image action, linking the encodedImage property of the Chart to the encodedImage.  When I varied the content of the transaction input property to use differenct columns, the changes showed in the PDF Document.
    Hope this is helpful.
    Kind Regards,
    Diana Hoppe

  • How do i change axis label object type from label to text? (to allow wrapping)

    In the example of a barChart, how does one change the LABEL type from "Label" to "Text"?
    I am trying to allow for long labels to wrap (ie. multi-line labels), but the default object type of labels is "Label" (which are single-line only).
    I have been researching this issue all day, and have enountered a similar situation for changing the Legend component labels where a method override is implemented in a custom itemRenderer.
    But I have not been able to figure out how to do this for an Axis label.
    Any help would be greatly appreciated!  
    J

    Yes, thank you.  I am aware of the AxisRenderer.... but I'm not sure how to implement it to change the label type from "Label" to "Text" to allow for wrapping.
    I guess what I'm looking for is a good example....  

  • X-axis labels on iChart

    I have a query that returns a count and a day. I am plotting the count on the y-axis and want to show the day on the x-axis. I want the label for the day to appear every 7 days or so so the labels do not overlap.
    I have tried every combination of ticks, labels per tick, and column mappings and can't seem to accomplish this.
    I get the tick marks every 7 days but, I get every label for every day all bunched up at the bottom of the x-axis.
    I know this is an junior level question but I am really stuck.
    Thanks in advance.

    My assumption is that you are using xMII 12.0.  My testing is on 12.0.4, so if you don't get similar results, please let me know what service release (or build number) you are using.
    This is going to be a bit odd and I am not sure why it works this way, but here you go:
    Create a new iChart, change the type to custom.
    Map your data field to Value column in Data Mapping
    Go to Data Series Details and change the type to bar for data series 1
    Go to X-Axis and add your date field to X-Axis Label Columns, set Date format to mm/dd/yy, leave Time format blank, make sure label depth is 1, uncheck Show Labels and Show 3-D Tick Marks, check Show Tick Marks, set Major Ticks to 10, Minor Ticks to 3, and Ticks per Label to 3.
    Save and run.
    Good luck,
    Mike

  • Axis Label Issue

    My application creats custom graphs using AS3 and a mySQL
    database. Almost all of the graphs render just fine, except I have
    one that is supposed to set its vertical axis min to 0% and its max
    at 75% with intervals every 25%, and yet its labels render as 0%,
    30%, 50%, and 80% instead of 0%, 25%, 50%, and 75%. The data and
    gridlines are correct, just the axis labels are wrong. If I set the
    min to anything other than 0, the labels are fine. This seems be a
    problem if the interval is set to anything other than 5 or 10 (like
    15 or 25). Can anyone tell me if this is a Flex bug or if this
    issue might be caused by something else? This occurs on a
    development server and the live server and there are a couple of
    other graphs that have this same issue.
    The graph in question can be seen at
    http://www.communityindicators.ewu.edu/graph.cfm?id=106.
    Thank you in advance for your help.

    Yeah, I solved this issue!
    I had to set the maximumLabelPrecision for the
    LinearAxis.

  • Formula for x axis labels

    I have a report with one group(CR2008 with .NET). That group has a customized group name field, and the group name is a formula. When I display the group name in the data section of the report, it displays according to the formula.
    I now need to chart two pieces of data - Primary # of Sales and Secondary # of Sales - for that group so I can compare the two # of sales. If I make a chart for the Primary # of Sales, and go to the group tab in the Chart Expert and specify "on change of Group By Value (my grouping), show the sum of the Primary # of Sales", the chart displays as desired, and I see the custom group name (formula) as the X axis label.
    But if I go to the Advanced Layout on the Data tab of the Chart expert and specify the Sum of Primary # of Sales AND Sum of Secondary # of Sales in the Show Values section, the X axis label no longer shows the custom group name; it shows the group value.
    Any ideas for how to get it to show the custom group name when I chart two fields of data?
    Also how to change the x axis orientation to vertical so that morei get  space for labels.
    Thanks in advance!

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • Adding custom axis titles for Bubble Chart

    How to add custom axis titles (for each group of axis values) as shown in the attached figure to a bubble chart ?
    - Sen

    I'm trying to do essentially the same thing with a LineChart and I think I've got part of it figured out.
    I've subclassed CategoryAxis and overridden reduceLabels to return only certain labels (the "group" labels). Then I create a new axis by adding a LineSeries to the chart's <series> element with the new axis within the LineSeries. Then I have an AxisRenderer in the chart's horizontalAxisRenderers tag that refers to the new axis from within the LineSeries.
    Subclassed axis:
        public class MonthCategoryAxis extends CategoryAxis
            public function MonthCategoryAxis()
                super();
            override public function reduceLabels(intervalStart:AxisLabel, intervalEnd:AxisLabel):AxisLabelSet
                var currentLabels:AxisLabelSet = this.getLabels(0); // Param is ignored by super class
                var newLabels:Array = []; // Labels to keep
                var label:AxisLabel;
                var previousLabel:AxisLabel;
                for (var i:int = 0; i < currentLabels.labels.length; i++)
                    label = currentLabels.labels[i];
                    if (i == 0) // Keep the first label
                        newLabels.push(label);
                    else if (label.value.month != previousLabel.value.month)
                        // Only keep a label if the previous label has a different month
                        newLabels.push(label);
                    previousLabel = label;
                // Return a new AxisLabelSet with just the labels we want
                var newLabelSet:AxisLabelSet = new AxisLabelSet();
                newLabelSet.labels = newLabels;
                return newLabelSet;
    New series to create the subclassed axis in.
                <mx:LineSeries>
                    <mx:horizontalAxis>
                        <charts:MonthCategoryAxis id="MonthAxis" labelFunction="calendarMonthAxisLabelFunction"/>
                    </mx:horizontalAxis>
                </mx:LineSeries>
    The AxisRenderer. canDropLabels must be "true".
                <mx:AxisRenderer axis="{MonthAxis}" canDropLabels="true" showLine="false" tickPlacement="none">
                    <mx:labelRenderer>
                        <mx:Component>
                                <mx:Label width="100%">
                                <mx:Script>
                                    <![CDATA[
                                    override public function set data(axisLabel:Object):void
                                        this.text = outerDocument.getMonthLabel(axisLabel.value);
                                    ]]>
                                </mx:Script>
                                </mx:Label>
                        </mx:Component>
                    </mx:labelRenderer>
                </mx:AxisRenderer>

  • 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

  • Does not display axis label in graph when exported to excel

    I have a wierd issue.I have a report with graph with coloum chart and axis labels description on x axis.WHen i export the report to PDF everything looks OK.But when i export it to excel few axis labels disapper.Out of 12 labels only 2 apper when exported to excel.Has anyone encountered this issue.
    If so is there a way to fix this.
    PS: I am using BO XI 3.1 Webi.
    Thank you,
    Sanjeev

    hi,
    I have tried this out with a sample.
    In WEBI preview mode and PDF, all axis labels will appear fine.
    But when exported to excel, some labels will disappear.
    Workaround: We have to increase the chart size in Excel till all axis labels appear clearly.
    Regards,
    Vamsee

Maybe you are looking for

  • Imac will not boot up, chimes with apple logo and beach ball spin??

    imac will not boot up, chimes with apple logo and beach ball spin?? after installing adobe flash and up graded apple softeware

  • 2 tables in standard report

    how do I insert two tables of different dimensions side by side in standard report.......... I am using Labview 2011 please help............. thank you in advance...............

  • Event ID 1114: Table was marked as in use while releasing a database session...

    I'm running Exchange 2010 SP2 RU1 in a two node DAG.  All the databases are mounted and healthy. Running ESEUTIL /G returned no errors (just some warnings about "orphaned scrubbed LV(401) detected" and said an offline defrag would fix it). Running ES

  • IPad and .mov file issue

    I am trying to play some .mov files on my iPad. I was able to drag and drop one of the files from my hard drive to the Movies folder in iTunes.  The drag and drop worked and the file plays fine.  I then go on to do the second file but get an error me

  • Suseia

    I cannot figure out how to download adobe digital editions onto my iPad so I can download library books?