[API Review]: RT-28148 - Add createSymbols Property to AreaChart / StackedAreaChart

Mark Fortner phidias51 at gmail.com
Mon Mar 11 16:20:34 PDT 2013

I recently came across the "createSymbols" property code in the LineChart
and was wondering if there was some reason to write it this way rather than
simply having a default implementation of some Symbol interface which the
user can replace by simply setting the value.

For my application, I ended up writing some conditional decorators for the
symbol, but as I was doing this I thought how much easier it would be if
the symbols had a factory where one could register new implementations, or
replace the factory itself to provide some conditional switching logic, etc.

Any thoughts on improving the flexibility of the charts?



On Mon, Mar 11, 2013 at 3:53 PM, Paru Somashekar <
parvathi.somashekar at oracle.com> wrote:

> Ok thanks Jasper. That makes sense. I updated RT-21539 with the our plan
> of not adding the API at the Series level.
> thanks,
> Paru.
> On 3/11/13 3:25 PM, Jasper Potts wrote:
>> I feel like adding "createSymbols" boolean property to Area,&
>>  StackedArea charts makes sense to match LineChart.
>> I don't like the idea of adding API to the series object on XYChart as
>> that is more generic and used by many chart types. If the user needs fine
>> grain control of symbols like in RT-21539 they can turn auto symbol
>> generation off with "createSymbols = false" then create their own symbol
>> nodes for the cases when they do want them.
>> Thanks
>> Jasper
>> On Mar 8, 2013, at 10:08 AM, Paru Somashekar<parvathi.**
>> somashekar at oracle.com <parvathi.somashekar at oracle.com>>  wrote:
>>  There is a request for adding the createSymbols flag at the XYChart's
>>> Series level instead of on Chart.
>>> JIRA : http://javafx-jira.kenai.com/**browse/RT-21539<http://javafx-jira.kenai.com/browse/RT-21539>
>>> I think it might be a good idea to add it at the Series level so that
>>> one can turn ON / OFF symbols per Series rather than for all the series of
>>> a chart.
>>> The API could continue to be the same - except live at the Series level.
>>> Each chart can then create symbols for each of its Series only if this flag
>>> is turned on.
>>> This might however not make much sense for Scatter, Bubble and BarCharts.
>>> What do you think Jasper?
>>> -Paru.
>>> On 3/8/13 4:12 AM, Sven Reimers wrote:
>>>> Hi all
>>>> AreaChart and StackedAreaChart are missing an API to simply disable the
>>>> creation of symbols. At the moment this is only possible by complex css
>>>> style acrobatics. LineChart on the other hand already provides a simple
>>>> way
>>>> to do this. The proposed tweak takes the existing API from LineChart and
>>>> adds this to AreaChart and StackedAreaChart.
>>>> Desired API change:
>>>>   /**
>>>>       * Indicates whether symbols for data points will be created or
>>>> not.
>>>>       *
>>>>       * @return true if symbols for data points will be created and
>>>> false
>>>> otherwise.
>>>>       */
>>>>      public final boolean getCreateSymbols() { return
>>>> createSymbols.getValue(); }
>>>>      public final void setCreateSymbols(boolean value) {
>>>> createSymbols.setValue(value); }
>>>>      public final BooleanProperty createSymbolsProperty() { return
>>>> createSymbols; }
>>>> Desired additional CSS property (incldues additional StyleableProperty):
>>>> -fx-create-symbols
>>>> JIRA:
>>>> http://javafx-jira.kenai.com/**browse/RT-28148<http://javafx-jira.kenai.com/browse/RT-28148>
>>>> Thank
>>>> -Sven
>>>> P.S. An updated patch will hopefully be available there too.

More information about the openjfx-dev mailing list