On Thu, 20 Jun 2024 17:44:41 GMT, Markus Mack <mm...@openjdk.org> wrote:

>> This PR provides the test case given in the JBS issue, and a simple fix for 
>> the index calculation when inserting data after previous data with duplicate 
>> categories.
>> 
>> Also, I've added a comment to `BarChart`s javadoc, clarifying the behavior 
>> that was apparently assumed (but broken) previously.
>> 
>> The index lookup is skipped for performance reasons if there are no 
>> duplicates, corresponding to the previous implementation.
>> Further optimizations would be possible, but probably are not really helpful 
>> without more extensive changes. The previous code already loops over all 
>> categories to check if they are present, typically nested in a loop adding 
>> many data items, thus already scaling quadratically when adding lots of 
>> mostly unique data points.
>
> Markus Mack has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   JavaDoc formatting

Also (this might be a separate issue), repeated invocation of "Add Series with 
Duplicate Category" menu causes XAxis legend to display ever increasing number 
of series:

![Screenshot 2024-06-20 at 11 59 
46](https://github.com/openjdk/jfx/assets/107069028/33402fe5-5ef9-43b0-9333-22fd68338ee9)

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1476#issuecomment-2181346168

Reply via email to