2 Replies Latest reply: Apr 2, 2013 9:15 PM by MarVinceReyes RSS

    ADF Mobile: PieChart component

    Bryan Laipple
      All the sample applications that come with the ADF Mobile extension use data controls and a collectionModel to provide data to a pie chart. Is there another way to generate a chart other than this? According to the tag library documentation the "value" attribute is not required for a dvtm:pieChart component. How could a user go about building a pie chart with static data or potentially just dynamic values from a managed bean? Here would be an example of the xml I would expect:

      <dvtm:pieChart id="pc1" title="Title">
      <amx:facet name="dataStamp">
      <dvtm:pieDataItem label="Slice 1" value="#{bean.sliceOneValue}"/>
      <dvtm:pieDataItem label="Slice 2" value="#{bean.sliceTwoValue}"/>

      This is valid in that there are no xml validation or compilation problems, but the component does not get rendered when the application is deployed.
        • 1. Re: ADF Mobile: PieChart component
          Frank Nimphius-Oracle

          to create charts from static data (though I don't quite understand the value add of this) you create a POJO that exposes a colelction (ArrayList) or objects that have a value and label property. You then create a Data Control from this POJO and drag and drop the collection as a pie graph. This is the easiest because declarative option. If you want to do the same with a managed bean then you do the same I assume and expose a collection. You then reference #{beanScope.beanName.collectionName.property}

          • 2. Re: ADF Mobile: PieChart component

            Were you able to get around this limitation?

            I've tried returning array or list but both didn't seem to work. To be exact, it was just staying at its loading state.

            But, the moment I convert my collection into a datacontrol then boom it works right away haha.

            A bit odd since I was used to ADF allowing me to directly attach collections.

            Testing with:
            - Android
            - SDK9
            - Release Mode