name the label dynamically -ios - iphone

I have created lables dynamically in my storyboard.
now i want to name those lables.
i am having no idea what should i do.
this is my code:
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Data Updated on July 7, 2012" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="ovU-eL-SMN">
<rect key="frame" x="313" y="961" width="444" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.047058823530000002" green="0.0" blue="0.35294117650000001" alpha="1" colorSpace="calibratedRGB"/>
<color key="highlightedColor" cocoaTouchSystemColor="darkTextColor"/>
</label>
here, i am using html code in storyboard.i am fetching value from database and put those values as lable text.I just have to name it and the value has to be passed in appdelegate
this is the mainstoryboard file

You can set tag property of each label like 10 , 11 , 12 as many you have label.
Then
for(int i=10 ;i<last_label_Tag;i++)
{
UILabel *lbl=(UILabel*)[self.view viewWithTag:i];
lbl.text=#"Define text for the labels"// or you can use separate Labels without loop.
}

Related

How to auto-wrap if total html or component properties >= n?

As I understand with the default settings in vscode. The properties below will only auto-wrap when it reaches to the maxiumum wordWrapColumn. (See below)
<h1 className="sample" height="20" width="30" color="20" size="200" />
// auto separated
<h1
className="sample"
height="20"
width="30"
color="blue"
size="200"
/>
I wanna ask if its possible to change this behavior? Instead of basing to wordWrapColumn, we check the total properties of an element / component.
We auto-newline when it reaches to the specified total props.
totalHtmlProps = 3
## case 1
<h1 className="sample" height="20" />
## case 2
<h1
className="sample"
height="20"
color="blue"
/>
a quick update: i'm also using prettier with this.

Making my project suitable for all iPhone sizes

I created a project with a storyBoard and when designing I used the 'view as iPhone11 PRO'. Now when I run the simulator on iPhone 11 MAX I get a hugh white bar on the right side. Ofcouse because the MAX has a bigger screen. Now I tried to set constraints, I tried a lot of different options by using tutorials etc (really a lot). But I just can't seem to get it working on my project.
The problem at the moment, I set all UIImage height and width and added missing constraints by using 'add missing constrains'. The only thing is, it doesn't do anything. I just expected that all images would be a little bit bigger so I'm having the same layout as on the 11 PRO.
ON THE LEFT THE iPHONE 11 PRO - ON THE RIGHT THE iPHONE 11 MAX
So, I guess the constraints are good but my images don't get bigger when running on a 11 MAX. What would be the best practise for this? (All my images are #x1 #x2 #x1)
"This is day 5 I'm trying..." - you should have spent those 5 days reading the docs and working through tutorials on auto-layout. As you have quickly found out, there is much more to it than positioning elements on a single sized screen and expecting it to look the same everywhere.
You are thinking that you need to make the "tiles" bigger for the larger screen, but what happens when a user runs your app on a smaller screen?
If you haven't learned about UIStackView yet, this may be hard to follow, but it is probably the way you want to go.
The "top" level of your layout has two equal-height sections. So...
We start with a Vertical stack view with Distribution: Fill Equally.
the top half has two equal width sections, so we embed a Horizontal stack view, also with *Fill Equally
the right-half of that section has another two equal-height elements, so we embed a Vertical stack view, also with *Fill Equally
the bottom half has two two equal-height elements, so we embed a Vertical stack view, *Fill Equally
the bottom half of that section has two equal width sections, so we embed a Horizontal stack view, *Fill Equally
All stack views have Spacing: 8
Now, to get it to fit on various screen sizes - while keeping the aspect ratios - we'll look at the overall size: Width is 360, and Height is 728 (we need to count the 8-pt spacing). So...
We'll give the outer-most stack view an Aspect Ratio of 360:728
We want to keep everything centered, so give the stack view CenterX and CenterY constraints.
An iPhone 11 Pro has a width of 375-pts, so to get your exact dimensions we need Leading and Trailing constraints (always to the safe-area) of 7.5
The Aspect Ratio constraint will handle the Height
We'll need to make a couple adjustments, and add a few more constraints, to handle other screen sizes...
That layout will "size up" to fit an 11 and an 11 Pro Max fine. However, on an iPhone 8 or 7 or SE, it will be too tall to fit the screen. To handle that, we can...
change the Leading and Trailing constraints to >= 7.5 (allowing the stack view to leave a little more space on the sides)
add Leading and Trailing constraints of Equal to Zero with Priority: 750 (Default High). That tells auto-layout to try to pull the sides to the edges
add Top and Bottom constraints of >= 0 to prevent it from extending above/below the screen
add Top and Bottom constraints of Equal to Zero with Priority: 750 (Default High). That tells auto-layout to try to pull the top and bottom to the edges
Here's how it looks in Storyboard:
Note that the image views have NO Constraints, and all stack views are set to Distribution: Fill Equally with Spacing: 8
Here's how that looks on various devices (very big image - click to see detail):
Because we cannot draw on "partial pixels" and some devices have 2 pixels-per-point and other devices have 3 pixels-per-point (we don't need to worry about #1x screens anymore) the actual sizes will not be exact - but they'll be close enough that you'd have to magnify and compare to see the differences.
Here is the source to a Storyboard with that layout so you can inspect it:
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="bdh-XY-7ei">
<device id="retina5_9" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Schurk Images View Controller-->
<scene sceneID="Zle-Gp-apY">
<objects>
<viewController id="bdh-XY-7ei" customClass="SchurkImagesViewController" customModule="DelMe" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Dyb-Gm-pEf">
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="Tyg-ff-xjO">
<rect key="frame" x="7.6666666666666572" y="47" width="360" height="728"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="JqK-ZW-H50">
<rect key="frame" x="0.0" y="0.0" width="360" height="360"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="AtH-1N-5xc">
<rect key="frame" x="0.0" y="0.0" width="176" height="360"/>
<color key="backgroundColor" red="0.55634254220000001" green="0.97934550050000002" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</imageView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="qMO-ld-jJw">
<rect key="frame" x="184" y="0.0" width="176" height="360"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Yhc-Ph-1ck">
<rect key="frame" x="0.0" y="0.0" width="176" height="176"/>
<color key="backgroundColor" red="0.55634254220000001" green="0.97934550050000002" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="nhS-Od-9jO">
<rect key="frame" x="0.0" y="184" width="176" height="176"/>
<color key="backgroundColor" red="0.55634254220000001" green="0.97934550050000002" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</imageView>
</subviews>
</stackView>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="WrS-eH-b3H">
<rect key="frame" x="0.0" y="368" width="360" height="360"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="won-nT-d54">
<rect key="frame" x="0.0" y="0.0" width="360" height="176"/>
<color key="backgroundColor" red="0.55634254220000001" green="0.97934550050000002" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</imageView>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="iS7-mQ-dnf">
<rect key="frame" x="0.0" y="184" width="360" height="176"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="xcJ-dz-KeY">
<rect key="frame" x="0.0" y="0.0" width="176" height="176"/>
<color key="backgroundColor" red="0.55634254220000001" green="0.97934550050000002" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="0FQ-rZ-x81">
<rect key="frame" x="184" y="0.0" width="176" height="176"/>
<color key="backgroundColor" red="0.55634254220000001" green="0.97934550050000002" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</imageView>
</subviews>
</stackView>
</subviews>
</stackView>
</subviews>
<constraints>
<constraint firstAttribute="width" secondItem="Tyg-ff-xjO" secondAttribute="height" multiplier="360:728" id="SdN-id-c4g"/>
</constraints>
</stackView>
</subviews>
<viewLayoutGuide key="safeArea" id="Q0H-gV-XLg"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="Tyg-ff-xjO" firstAttribute="top" secondItem="Q0H-gV-XLg" secondAttribute="top" priority="750" id="2Ih-jC-mAG"/>
<constraint firstItem="Tyg-ff-xjO" firstAttribute="centerY" secondItem="Q0H-gV-XLg" secondAttribute="centerY" id="EnC-xv-6e3"/>
<constraint firstItem="Tyg-ff-xjO" firstAttribute="top" relation="greaterThanOrEqual" secondItem="Q0H-gV-XLg" secondAttribute="top" id="KBQ-9p-3NJ"/>
<constraint firstItem="Q0H-gV-XLg" firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="Tyg-ff-xjO" secondAttribute="trailing" constant="7.5" id="KP5-ws-DRX"/>
<constraint firstItem="Tyg-ff-xjO" firstAttribute="leading" secondItem="Q0H-gV-XLg" secondAttribute="leading" priority="750" id="LSW-Dg-4V8"/>
<constraint firstItem="Q0H-gV-XLg" firstAttribute="bottom" secondItem="Tyg-ff-xjO" secondAttribute="bottom" priority="750" id="N6T-iS-PU1"/>
<constraint firstItem="Q0H-gV-XLg" firstAttribute="trailing" secondItem="Tyg-ff-xjO" secondAttribute="trailing" priority="750" id="V1E-M5-o7w"/>
<constraint firstItem="Q0H-gV-XLg" firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="Tyg-ff-xjO" secondAttribute="bottom" id="gVs-hN-gNr"/>
<constraint firstItem="Tyg-ff-xjO" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Q0H-gV-XLg" secondAttribute="leading" constant="7.5" id="gih-7i-tg8"/>
<constraint firstItem="Tyg-ff-xjO" firstAttribute="centerX" secondItem="Q0H-gV-XLg" secondAttribute="centerX" id="knQ-zw-EAq"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="ddD-Pk-Baz" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-407" y="1534"/>
</scene>
</scenes>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
Each UIImage will not change size dynamically with different screen sizes because you set width and height constraints to constants.
I'd suggest removing the constraints on each UIImage and instead add them to a UIStackView. Add constraints to pin the edges of the UIStackView to the view's safeAreaLayoutGuide. The UIStackView will handle resizing your UIImage's based on it's alignment and distribution properties.
Documentation on UIStackView: https://developer.apple.com/documentation/uikit/uistackview

contraints in tableviewcell seem to be ignored

I can't get these sliders to line up, Im not sure why.
here's my storyboard ...that trailing constraint is clearly being ignored. What am I doing wrong?
edit: for matt:
I deleted all constraints
and control-dragged two of them, which should have been sufficient: the trailing: 14 and the center Y (now on superview, the rhs being label was in error). there is no "remove at runtime" on any drawn constraints.
the flags are visible but there's no indication of what they mean (the size inspector unhelpfully says only "has ambiguous constraint").
edit #2
Based on input here and in swift discord, Here's an example of the view with changes applied:
and here is the relevant xml of that storyboard:
<tableViewCell clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" restorationIdentifier="RootAppCell" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="RootAppCell" id="PDl-Cx-SrR" customClass="RootAppCell" customModule="Assignment_5">
<rect key="frame" x="0.0" y="28" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="PDl-Cx-SrR" id="EHS-uv-XgI" customClass="RootAppCell" customModule="Assignment_5">
<rect key="frame" x="0.0" y="0.0" width="343" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uDJ-B5-x3A">
<rect key="frame" x="277" y="6" width="51" height="31"/>
</switch>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="App Name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fWL-xO-z8g">
<rect key="frame" x="18" y="11" width="81" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="fWL-xO-z8g" firstAttribute="centerY" secondItem="EHS-uv-XgI" secondAttribute="centerY" id="G84-Ys-Q8G"/>
<constraint firstItem="fWL-xO-z8g" firstAttribute="leading" secondItem="EHS-uv-XgI" secondAttribute="leadingMargin" constant="3" id="JrD-j0-SxV"/>
<constraint firstItem="uDJ-B5-x3A" firstAttribute="centerY" secondItem="EHS-uv-XgI" secondAttribute="centerY" id="Q5Q-sy-Qh7"/>
<constraint firstAttribute="trailingMargin" secondItem="uDJ-B5-x3A" secondAttribute="trailing" constant="2" id="bMt-16-diy"/>
<constraint firstItem="uDJ-B5-x3A" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="fWL-xO-z8g" secondAttribute="trailing" id="he7-G6-aBc"/>
</constraints>
</tableViewCellContentView>
If you are unclear on which constraints that are conflicting, take a look at the console output when you load the screen, you should be able to see something that looks similar to this
(
"<NSLayoutConstraint:0x6199cd0 UIButton:0x7fbbf90.width == 0 (active)>",
"<NSLayoutConstraint:0x6998ec0 H:|-(15)-[UILabel:0x6ce60] (active, names: '|':UIButton:0x7fbbf90 )>",
"<NSLayoutConstraint:0x6199000 H:[UILabel:0x6ce60]-(15)-| (active, names: '|':UIButton:0x7fbbf90 )>"
)
And to help even further, you can use this web page to paste that section and it will at least tell you which constraints that are conflicting in your code..
https://www.wtfautolayout.com/
Table view cells can be tricky since they will get additional constraints based on for instance what you have set as row height of the cell etc.
Hope this helps the debugging
This is what I tried, and worked well for me:
Add Constraints:
Leading of the UILabel from superView is 15.
Center Y of UILabel is equal to superView's center Y.
Bottom of UIView (divider view) from superView is 0
Trailing of UIView (divider view) from superView is 0
Leading of UIView (divider view) from superView is 0
Horizontal space between UILabel and UISwitch is 5.
Center Y of UISwitch is equal to superView's center Y.
Trailing of the UISwitch from the superview is 10.
One more extra constraint needed for UIView (divider view) that is Height of the view is 1.
Here is the output:
Hope this will help you!!

removing extra space from top and left when using formitems in flex

I want to remove the extra space/padding/gap from FormItem I,m using in form for a mobile project in flex 4.6
I have tried making gap and padding to 0 but there the form and it's fields are still have indent to the right and top ?
<s:FormItem label="Start Date" width="150">
<s:HGroup>
<s:TextInput id="startDate" width="90" editable="false"/>
<s:Button id="setStartDate" label="set" height="34" fontSize="10" click="setStartDate_clickHandler(event)"/>
</s:HGroup>
</s:FormItem>
<s:FormItem label="End Date" width="150">
<s:HGroup>
<s:TextInput id="endDate" width="90" editable="false"/>
<s:Button id="setEndDate" label="set" height="34" fontSize="10" click="setEndDate_clickHandler(event)"/>
</s:HGroup>
</s:FormItem>
</s:HGroup>
</s:Form>
Gap between two form items, verticalGap.(set it on Form container)
Default hgroup gap is 6, set it to 0.
If gap between two items withn the FormItem, verticalGap (set this on the form container)
Form has FormHeading, set paddingTop=0 on this FormHeading comp. Also, try to set the height of this to 0 and PaddingTop = 0 on the form to reduce the gap btwn the first element and the top of the Form container.
This has good information about it http://livedocs.adobe.com/flex/3/html/help.html?content=layouts_08.html

iReport displays too many labels on x axis

Good morning! I'm having a problem with Jaspersoft iReport 4.5.0, and I was hoping for some help. Basically, when I display an xy line chart, it's attempting to add a label on the x-axis for each data point. I have almost 200 data points, so this ends up looking like just a solid line, even if I tweak the rotation of the tick labels or whatever.
I'm aware that the general response to this question is to use a timeseries chart instead. This would ordinarily work, but in my instance I am using a multi-axis chart where the opposite axis is a bar chart. Since a bar chart has no timeseries variety, iReport will not allow me to mix a bar chart with a timeseries chart, forcing me to use the xy line chart.
Is there any way I can have my cake and eat it, too? Some way I can filter out some of the labels? Or perhaps limit the number of labels that can be displayed, spread out over the x-axis? I have yet to see a definitive answer anywhere on the internet!
Thanks in advance!
- Ian
EDIT: Here is the jrxml for one of the multi-axis charts I'd like to modify:
<multiAxisChart>
<chart evaluationTime="Report" hyperlinkType="LocalAnchor">
<reportElement x="42" y="441" width="440" height="292"/>
<chartTitle position="Top">
<titleExpression><![CDATA["CICS Elapsed"]]></titleExpression>
</chartTitle>
<chartSubtitle/>
<chartLegend/>
<anchorNameExpression><![CDATA["CICS Elapsed Small"]]></anchorNameExpression>
<hyperlinkAnchorExpression><![CDATA["CICS Elapsed Big"]]></hyperlinkAnchorExpression>
<hyperlinkTooltipExpression><![CDATA["Click to Enlarge"]]></hyperlinkTooltipExpression>
</chart>
<multiAxisPlot>
<plot/>
<axis position="leftOrTop">
<lineChart>
<chart>
<reportElement x="0" y="0" width="0" height="0" backcolor="#FFFFFF"/>
<chartTitle position="Top" color="#000000">
<titleExpression><![CDATA["CICS Elapsed"]]></titleExpression>
</chartTitle>
<chartSubtitle color="#000000"/>
<chartLegend textColor="#000000" backgroundColor="#FFFFFF"/>
</chart>
<categoryDataset>
<dataset>
<datasetRun subDataset="wmprod_cics"/>
</dataset>
<categorySeries>
<seriesExpression><![CDATA["Cpu Time"]]></seriesExpression>
<categoryExpression><![CDATA[$F{TIMESTAMP}]]></categoryExpression>
<valueExpression><![CDATA[$F{ELAPSTIME}]]></valueExpression>
</categorySeries>
</categoryDataset>
<linePlot isShowShapes="false">
<plot/>
<categoryAxisLabelExpression><![CDATA["Date/Time"]]></categoryAxisLabelExpression>
<valueAxisLabelExpression><![CDATA["Avg Elapsed Time (ms)"]]></valueAxisLabelExpression>
</linePlot>
</lineChart>
</axis>
<axis position="rightOrBottom">
<barChart>
<chart>
<reportElement x="0" y="0" width="0" height="0" backcolor="#FFFFFF"/>
<chartTitle position="Top" color="#000000">
<titleExpression><![CDATA["CICS Elapsed"]]></titleExpression>
</chartTitle>
<chartSubtitle color="#000000"/>
<chartLegend textColor="#000000" backgroundColor="#FFFFFF"/>
</chart>
<categoryDataset>
<dataset>
<datasetRun subDataset="wmprod_cics"/>
</dataset>
<categorySeries>
<seriesExpression><![CDATA["Volume (transactions)"]]></seriesExpression>
<categoryExpression><![CDATA[$F{TIMESTAMP}]]></categoryExpression>
<valueExpression><![CDATA[$F{TRANSCOMPL}]]></valueExpression>
</categorySeries>
</categoryDataset>
<barPlot>
<plot/>
<itemLabel/>
<valueAxisLabelExpression><![CDATA["Volume (transactions)"]]></valueAxisLabelExpression>
</barPlot>
</barChart>
</axis>
</multiAxisPlot>
</multiAxisChart>
I had the same problem. I think the answer is this:
<chart>
<reportElement x="0" y="0" width="802" height="215">
<property name="net.sf.jasperreports.chart.domain.axis.tick.interval" value="1"/>
</reportElement>
Set the tick interval as appropriate. Note: My chart was a scatter chart. Untested with line chart.