JMC-5359: Ugly values on Y axis when no events
Mario Torre
neugens at redhat.com
Mon Oct 1 14:05:20 UTC 2018
On Mon, Oct 1, 2018 at 4:01 PM Marcus Hirt <marcus.hirt at oracle.com> wrote:
>
> Hi Ken,
>
> Check with Mario if he can sponsor your change. I think he is currently busy setting up a new computer. So, if not, I can do it.
Yeah, still not finished... I'll try to push the patch later tonight
if you can't make it before.
Cheers,
Mario
> Kind regards,
> Marcus
>
> On 2018-10-01, 15:58, "jmc-dev on behalf of Marcus Hirt" <jmc-dev-bounces at openjdk.java.net on behalf of marcus.hirt at oracle.com> wrote:
>
> Hi Ken,
>
> Looks good!
>
> Kind regards,
> Marcus
>
> On 2018-10-01, 15:50, "jmc-dev on behalf of Ken Dobson" <jmc-dev-bounces at openjdk.java.net on behalf of kdobson at redhat.com> wrote:
>
> Hi all,
>
> just checking to see if someone could take a quick look at the patch above
> when they have a chance.
>
> Thanks,
>
> Ken
>
> On Tue, Sep 18, 2018 at 5:17 PM, Ken Dobson <kdobson at redhat.com> wrote:
>
> > Hi all,
> >
> > This is another simple UI fix for JMC-5359, which also appears to be a
> > duplicate of JMC-5045 as well. If someone could have a look at it that'd be
> > great.
> > Jira: https://bugs.openjdk.java.net/projects/JMC/issues/JMC-5359
> > https://bugs.openjdk.java.net/projects/JMC/issues/JMC-5045
> >
> > diff -r 9ebfa2888b8f application/org.openjdk.jmc.
> > ui/src/main/java/org/openjdk/jmc/ui/charts/XYDataRenderer.java
> > --- a/application/org.openjdk.jmc.ui/src/main/java/org/openjdk/
> > jmc/ui/charts/XYDataRenderer.java Fri Sep 14 01:21:16 2018 +0200
> > +++ b/application/org.openjdk.jmc.ui/src/main/java/org/openjdk/
> > jmc/ui/charts/XYDataRenderer.java Tue Sep 18 17:11:03 2018 -0400
> > @@ -44,6 +44,7 @@
> >
> > import org.openjdk.jmc.common.IDisplayable;
> > import org.openjdk.jmc.common.unit.IQuantity;
> > +import org.openjdk.jmc.common.unit.UnitLookup;
> > import org.openjdk.jmc.common.util.ColorToolkit;
> > import org.openjdk.jmc.ui.charts.AWTChartToolkit.IColorProvider;
> > import org.openjdk.jmc.ui.charts.IChartInfoVisitor.IBucket;
> > @@ -200,9 +201,11 @@
> >
> > if (yAxisMin != null && yAxisMax != null) {
> > FontMetrics fm = context.getFontMetrics();
> > - // If min=max, expand range to be [min, min+1]
> > + /* If min=max, expand range to be [min, min+1], or [min,
> > min+1024] in the case of
> > + a graph measured in bytes*/
> > if (yAxisMin.compareTo(yAxisMax) == 0) {
> > - yAxisMax = yAxisMin.getUnit().quantity(yAxisMin.doubleValue()
> > + 1);
> > + int offset = yAxisMin.getUnit() == UnitLookup.BYTE ? 1024
> > : 1;
> > + yAxisMax = yAxisMin.getUnit().quantity(yAxisMin.doubleValue()
> > + offset);
> > } else {
> > // Add sufficient padding to ensure that labels for ticks
> > <= yAxisMax fit,
> > // and constant value graphs are discernible.
> >
> > Thanks,
> >
> > Ken
> >
>
>
>
>
>
>
>
>
--
Mario Torre
Associate Manager, Software Engineering
Red Hat GmbH <https://www.redhat.com>
9704 A60C B4BE A8B8 0F30 9205 5D7E 4952 3F65 7898
More information about the jmc-dev
mailing list