Jump to content
Changes to the Jaspersoft community edition download ×
  • Using marker symbol with a bucket property


    jzhou_1
    • Features: Charts Product: JasperReports® Library

    Requirement:

    A customer is using the bucket property to load the custom images as below. 

    [toc]
    <bucketProperty name="symbol">
        <![CDATA["url(file:///C://reports//images//" + $F{legendImage} + ")"]]>
    </bucketProperty>
    

    How can we control the size of images? With Highcharts, we can define the width & height as below: 

    marker: {
                symbol: 'url(https://www.highcharts.com/samples/graphics/snow.png)',
                width:15,
                height:15,
    }
    

    Resolution:

    Use the contributorProperty as following:

    <hc:contributor name="SeriesProperty">
        <hc:contributorProperty name="marker.symbol" valueType="Bucket" value="via.symbol"/>
        <hc:contributorProperty name="marker.width" valueType="Expression">
            <hc:valueExpression>15</hc:valueExpression>
        </hc:contributorProperty>
        <hc:contributorProperty name="marker.height" valueType="Expression">
            <hc:valueExpression>15</hc:valueExpression>
        </hc:contributorProperty>
    </hc:contributor>
    
    The sample jrxml is attached.

    highchartschart_1.jrxml


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...