Jump to content
We've recently updated our Privacy Statement, available here ×

craig.linderoth

Members
  • Posts

    5
  • Joined

  • Last visited

craig.linderoth's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. I need to find a way to use a calculated aggregates as the series value in HighCharts. I have found the solution for Crosstabs, but there doesn't seem to be the same type of solution for HighCharts. For example, a heatmap needs to show the avg price for a product by store. The calculation should be SUM(SALE_PRICE) OVER (PARTITION BY PRODUCT,STORE) / SUM(ORDER_QTY) OVER (PARTITION BY PRODUCT,STORE). I can get the two sum values correct, create a hidden measure with these fields where the calculation is set to sum. But I can't find anyway to get the rate calculated correctly. Any measure defined in a high chart doesn't have the standard properties to set it's evaluation time. If I create three variables, the sum isn't happening at the correct intersection. In crosstabs, I created the two sum measures for each intersection, and then in the cell display I did the TOTAL_PRICE/TOTAL_QTY as the display value. I am wondering if there is a way to do this same kind of behavior for a series in a high chart. I have the two metrics and have been trying to find a way to supersede the data.value property of a displayed series with this rate calculation but to no avail. <multiAxisMeasure name="td" class="java.lang.Double" calculation="Sum"><labelExpression><![CDATA["td"]]></labelExpression><valueExpression><![CDATA[$F{Fact.QUANTITY}]]></valueExpression></multiAxisMeasure><multiAxisMeasure name="cd" class="java.lang.Double" calculation="Sum"><labelExpression><![CDATA["cd"]]></labelExpression><valueExpression><![CDATA[$F{Fact.SALE_PRICE}]]></valueExpression></multiAxisMeasure></multiAxisData><hc:series name="Percent Booked"><hc:contributor name="SeriesProperty"><hc:contributorProperty name="data.value" valueType="Bucket"><hc:valueExpression><![CDATA["function(){return this.point.cd/this.point.td }"]]></hc:valueExpression></hc:contributorProperty></hc:contributor><hc:contributor name="SeriesItemProperty"><hc:contributorProperty name="td" valueType="Measure" value="td"/><hc:contributorProperty name="cd" valueType="Measure" value="cd"/></hc:contributor></hc:series><hc:series name="td" visible="false"/><hc:series name="cd" visible="false"/>
  2. Use the Function Return to send multiple parameters into an expected JSON for highcharts. The list array is fine with only a single parameter with multiple values, but here you need multiple parameters answered: <hc:chartProperty name="colorAxis.dataClasses"><hc:propertyExpression><![CDATA["function(){return [{to: 0, color: '#FFFFFF', name: 'Missing Data'},{from: 0, to: 20, color: '#4A90E2', name: 'From 0 to 20%'},{from: 20, to: 40, color: '#6FA7E8', name: 'From 20% to 40%'},{from: 40, to: 60, color: '#93BDEE', name: 'From 40% to 60%'},{from: 60, to: 90, color: '#B7D3F4', name: 'From 60% to 90%'},{from: 90, color: '#DBE9FA', name: 'From 90% to 100%'}]}()"]]></hc:propertyExpression></hc:chartProperty>
  3. Still no solution? There has to be a way to add a class to the dom object or something to allow these charts to have the same resize behavior as in the adhoc tools.
  4. When a HighChart object is created in the AdHoc tool on the server and then pulled into a web DIV by visualize, the chart will dynamically resize as the window is expanded or contracted. However, when we build the chart in JasperStudio, because we need to manipulate many of the properties and make better Input Controls, the chart is rendered as a static size. We have moved the chart out of the table that is is embedded in when run from a JasperStudio object, however it is still a static layout. I have looked through the beforeRender DOM manipulation to try and see if I can add the resize, but still no luck. http://jsfiddle.net/Galadin/ck1zcu4j/ is the current fiddle I am using to try and manipulate the DOM (you can't actually run this code since our server is behind our firewall).
×
×
  • Create New...