Vertical axis not aligning to the left - telerik

I've a NativeScript RadCartesianChart with a DateTimeContinuousAxis. By using the DateTimeContinuousAxis the content of the chart doesn't seem to align to the left, instead it has some space between the horizontal axis and the content.
How can I align the content to the left?
<RadCartesianChart tkExampleTitle tkToggleNavButton>
<RadCartesianChartGrid tkCartesianGrid horizontalLinesVisible="true" horizontalStripLinesVisible="true"
horizontalStrokeColor="#E5E5E5" horizontalStrokeWidth="1" horizontalStripLineColor="#ffffff, #ffffff">
</RadCartesianChartGrid>
<LinearAxis lineHidden="true" labelMargin="25" tkCartesianVerticalAxis></LinearAxis>
<DateTimeContinuousAxis tkCartesianHorizontalAxis majorStep="2" majorStepUnit="Hour" dateFormat="HH:mm"
labelFitMode="Rotate" labelRotationAngle="1.2">
</DateTimeContinuousAxis>
<Palette tkCartesianPalette>
<PaletteEntry tkCartesianPaletteEntry fillColor="#AFD9FD" strokeColor="#54AFFB"></PaletteEntry>
</Palette>
<SplineAreaSeries tkCartesianSeries legendTitle="Prijzen" [items]="priceSource" categoryProperty="applyDate"
valueProperty="price">
</SplineAreaSeries>
</RadCartesianChart>

Related

Geoserver: how to deal with overlapping labels on overlapping polygons

I've got overlapping polygons with labels and looking for an opportunity to display them (labels) without overlaying.
example screen
Here are the options i've tried in SLD:
<TextSymbolizer>
<Label>
<ogc:PropertyName>my_label</ogc:PropertyName>
</Label>
<Fill>
<CssParameter name="fill">#880015</CssParameter>
</Fill>
<VendorOption name="partials">false</VendorOption>
<VendorOption name="conflictResolution">false</VendorOption>
<VendorOption name="spaceAround">10</VendorOption>
</TextSymbolizer>

PieSeries shows only thin line instead of a full slice color when one value is 100% of total value

I am experiencing a strange behaviour of RadPieChart and PieSeries.
PieSeries is showing only a thin line when one value represents 100% of total.
EDIT: here is the link for Playground demo, if you want to try it out on your device - https://play.nativescript.org/?template=play-ng&id=ZxmuR5&v=2
or you can use this link of my github project if you want to test it on your device: https://github.com/VukMNE/PieSeriesMalfunction
If my description is not clear, bellow are images to illustrate the problem I am facing. First image shows regular behavior of PieSeries, and the second one shows the problematic behavior.
Bellow is the example of a normal pie chart that is working correctly in my app. There are two slices, and both of them are filled with color.
But if one value is the equal to the total amount, instead of showing a one slice filled with color, it is only showing a thin line.
The code for both charts is identical. These charts are dynamic, and they display different data based on the parameters from the user. However, bellow is the code for both charts.
<RadPieChart *ngIf="!noDataFound" tkExampleTitle tkToggleNavButton minHeight="200" allowAnimation="true" row="0">
<PieSeries tkPieSeries
seriesName="collectPie"
selectionMode="None"
expandRadius="0.4"
outerRadiusFactor="0.7"
valueProperty="amountCollected"
legendLabel="nameForLabel"
showLabels="true"
showPercentage="false"
[items]="pieSourceCollected">
<PointLabelStyle tkPieLabelStyle margin="15" textFormat="%.2f €"></PointLabelStyle>
</PieSeries>
<Palette tkPiePalette seriesName="collectPie">
<PaletteEntry tkPiePaletteEntry fillColor="#1B998B" strokeColor="#1B998B"></PaletteEntry>
<PaletteEntry tkPiePaletteEntry fillColor="#97C8EB" strokeColor="#97C8EB"></PaletteEntry>
<PaletteEntry tkPiePaletteEntry fillColor="#001F54" strokeColor="#001F54"></PaletteEntry>
<PaletteEntry tkPiePaletteEntry fillColor="#2B193D" strokeColor="#2B193D"></PaletteEntry>
<PaletteEntry tkPiePaletteEntry fillColor="#484D6D" strokeColor="#484D6D"></PaletteEntry>
<PaletteEntry tkPiePaletteEntry fillColor="#2C365E" strokeColor="#2C365E"></PaletteEntry>
</Palette>
<RadLegendView tkPieLegend position="Top" width="100%"></RadLegendView>
</RadPieChart>
Code for the second chart:
<RadPieChart *ngIf="!noDataFound" tkExampleTitle tkToggleNavButton minHeight="200" allowAnimation="true" row="0">
<PieSeries tkPieSeries
seriesName="collectPie"
selectionMode="None"
expandRadius="0.4"
outerRadiusFactor="0.7"
valueProperty="amountSpent"
legendLabel="nameForLabel"
showLabels="true"
showPercentage="false"
[items]="pieSourceSpent">
<PointLabelStyle tkPieLabelStyle margin="15" textFormat="%.2f €"></PointLabelStyle>
</PieSeries>
<Palette tkPiePalette seriesName="collectPie">
<PaletteEntry tkPiePaletteEntry fillColor="#1B998B" strokeColor="#1B998B"></PaletteEntry>
<PaletteEntry tkPiePaletteEntry fillColor="#97C8EB" strokeColor="#97C8EB"></PaletteEntry>
<PaletteEntry tkPiePaletteEntry fillColor="#001F54" strokeColor="#001F54"></PaletteEntry>
<PaletteEntry tkPiePaletteEntry fillColor="#2B193D" strokeColor="#2B193D"></PaletteEntry>
<PaletteEntry tkPiePaletteEntry fillColor="#484D6D" strokeColor="#484D6D"></PaletteEntry>
<PaletteEntry tkPiePaletteEntry fillColor="#2C365E" strokeColor="#2C365E"></PaletteEntry>
</Palette>
<RadLegendView tkPieLegend position="Top" width="100%"></RadLegendView>
</RadPieChart>
I have even tried filtering the datasource for the chart, by removing the values that are equal to zero, but the bug is still there. It should show a full pie, instead of this thin line, shouldn't it?

Nativescript-ui-charts: PointLabelStyle of PieSeries remove borders (stroke)

I'm trying to show a pie chart with their values inside the chart but when I set showLabels="true" it also adds a white box around the value.
I'd like to remove these boxes but the strokeColor and strokeWidth properties doesn't seem to work. Is there any workaround for this?
<RadPieChart height="300" allowAnimation="true" row="0">
<PieSeries tkPieSeries expandRadius="0.5" outerRadiusFactor="0.7" [items]="pieSource" valueProperty="Amount" showLabels="true">
<PointLabelStyle tkPieLabelStyle strokeColor="cyan" strokeWidth="3" fillColor="red" textSize="8"></PointLabelStyle>
</PieSeries>
</RadPieChart>

xsl-fo absolute placement of images

I am trying to put an image in the left upper corner of the page.
However hard I try, i cannot place the image correctly. There is always ca 1mm space between the image and the top of the page!
The problem seems to be in the placement of the external-graphic. the enclosing block (yellow) is placed correctly but the image is shifted down. you can see this in the pdf, the enclosing yellow block is visible above the gray image!
I tried some combinations of attributes trying to influence the placement of the image (absolute-position, position, space-before) but with no effect.
appreciate your help!
here is how it looks like:
boxes.pdf
here is my fo.xml:
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:r="http://xml.lazalab.com/reditor" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" language="DE">
<fo:layout-master-set>
<fo:simple-page-master fox:scale="1" fox:crop-offset="5mm" fox:crop-box="media-box" fox:bleed="5mm" margin-right="0mm" margin-left="0mm" margin-bottom="0mm" margin-top="0mm" master-name="MASTERsite1" page-width="214mm" page-height="301mm">
<fo:region-body background-color="green" margin="0mm"/>
<fo:region-before background-color="yellow" precedence="true" extent="0mm"/>
<fo:region-after background-color="cyan" precedence="true" extent="0mm"/>
<fo:region-start background-color="pink" extent="0mm"/>
<fo:region-end background-color="gold" extent="0mm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="MASTERsite1">
<fo:flow reference-orientation="0" border-collapse="collapse" flow-name="xsl-region-body">
<fo:block-container absolute-position="absolute" width="214mm" height="301mm" background-color="cyan">
<fo:block-container overflow="hidden" width="100mm" height="200mm" background-color="cyan">
<fo:block top="0mm" left="0mm" padding="0mm" margin="0mm" background-color="yellow">
<fo:external-graphic line-height="0mm" padding="0mm" margin="0mm" width="100mm" height="200mm" background-color="grey" src="#"/>
</fo:block>
</fo:block-container>
</fo:block-container>
</fo:flow>
</fo:page-sequence>
</fo:root>
Set line-height on the block with the image to "0" and test again. It is likely the image is placed according to the font baseline. As in:
<fo:block top="0mm" left="0mm" padding="0mm" margin="0mm" background-color="yellow" line-height="0mm" >
<fo:external-graphic padding="0mm" margin="0mm" content-width="100mm" height="200mm" background-color="grey" src="test.jpg"/>
</fo:block>
I tested this with a few formatters and the image goes to the top of the page.

Apache FOP: zindex does not appear to be working in overlapping blocks

I am a FOP newb. I am trying to show text on top of an image by using block-container's and zindexes. The image is always on top though. If i remove the image, i can see the text, so the text is under the image.
This is inside of a table cell. here is the relevant code:
<fo:table-cell padding="0.000pt" text-align="left" display-align="before">
<fo:block>
<fo:block-container z-index="2" position="absolute" left="0.913in" top="0.139in" width="0.946in" height="0.198in" overflow="hidden">
<fo:block><fo:inline font-family="Verdana" font-size="8pt">Leasure Station</fo:inline></fo:block>
</fo:block-container>
<fo:block-container z-index="2" position="absolute" left="0.091in" top="0.431in" width="0.302in" height="0.239in" overflow="hidden">
<fo:block><fo:inline font-family="Verdana" font-size="8pt">#1</fo:inline></fo:block>
</fo:block-container>
<fo:block-container z-index="2" position="absolute" left="0.653in" top="0.431in" width="1.186in" height="0.177in" overflow="hidden">
<fo:block><fo:inline font-family="Verdana" font-size="8pt">ASDF1234QWER</fo:inline></fo:block>
</fo:block-container>
<fo:block-container z-index="1" position="absolute" left="0in" top="0in" width="48.5mm" height="20mm" overflow="hidden">
<fo:block><fo:external-graphic src="url(.\fop-1.0\img\orange_s_text.png)" content-width="48.500mm" scaling="non-uniform" content-height="20.000mm"/></fo:block>
</fo:block-container>
</fo:block>
</fo:table-cell>
moved the block with index 1 before all the zindex=2 blocks and it worked. whatever.

Resources