Opened 12 years ago

Closed 8 years ago

Last modified 8 years ago

#6355 closed defect (worksforme)

Charting theme anti-aliasing has no effect

Reported by: guest Owned by: Tom Trenka
Priority: high Milestone: future
Component: Charting Version: 1.1.0
Keywords: charting, antialias Cc:
Blocked By: Blocking:

Description

It seems that turning off anti-aliasing has no effect with any browser that uses SVG; I tried Firefox 2.0.0.13, Opera 9.23 and Safari 3.0.4. OS: Windows XP SP2.

Chart lines look blurry because of this: http://img184.imagevenue.com/view.php?image=11595_dojo_charting_antialias_122_193lo.jpg

theme = new dojox.charting.Theme({antiAlias: false, series: {stroke: {width:1}}})
theme.antiAlias = false
chart.setTheme(theme)
console.log(theme)

Attachments (1)

dojo_charting_antialias.jpg (41.8 KB) - added by guest 12 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 12 years ago by Eugene Lazutkin

Owner: changed from Eugene Lazutkin to Tom Trenka

Changed 12 years ago by guest

Attachment: dojo_charting_antialias.jpg added

comment:2 Changed 12 years ago by Tom Trenka

Currently dojox.gfx does not support setting alias properties; the issue is that it's very renderer dependent. Keeping the bug open so that when dojox.gfx does add support for this, we can make sure it's implemented within the Charting theme code.

IIRC, I added that property to Theme as a "future-build" feature, thinking that it would not change the API at all if and when support for this is added to dojox.gfx.

comment:3 Changed 12 years ago by alex

this seems like a cop-out to me. We should support the property and do it on the renderers that do it. I don't know why we'd wait if the intent is to do it "some day".

comment:4 Changed 12 years ago by Eugene Lazutkin

It looks like only SVG supports this feature. Do we really want to add SVG-only feature to all renderers, if we cannot support these feature more-or-less consistently across the board? Maybe we should. The answer is not that clear.

comment:5 Changed 12 years ago by alex

I think we should do what is going to make charting look best on average. SVG is supported on WebKit?, FF, and Opera. IE is the only laggard there, and if we can get anti-aliased lines in Silverlight (and I assume we can), then it seems reasonable to assume that the hint is useful and/or that charting should try to "do the right thing", whatever that may be.

Regards

comment:6 Changed 12 years ago by Eugene Lazutkin

Owner: changed from Tom Trenka to Eugene Lazutkin
Status: newassigned

comment:7 Changed 12 years ago by Tom Trenka

@alex: I don't disagree, I was just pointing out that this is a lower-level bug than just with charting, and we need to decide what the API for it should be with dojox.gfx. From there it would be easy to get the charting engine to respect the value.

comment:8 Changed 12 years ago by Eugene Lazutkin

Milestone: 1.2

comment:9 Changed 11 years ago by Eugene Lazutkin

Milestone: 1.2future

Moving all open ticketd to the future.

comment:10 Changed 8 years ago by ben hockey

Owner: changed from Eugene Lazutkin to Tom Trenka

comment:11 Changed 8 years ago by Tom Trenka

Resolution: worksforme
Status: assignedclosed

GFX will probably not support this until DTK 2.0; until then, there is a (hackish) way of getting around it. The problem is that the solution will end up being applied to the whole chart...

Basically, what you'd do is this in your CSS:

#myChart svg {
    shape-rendering: crispEdges;
}

It needs to be done on a chart-by-chart basis and it will apply to *everything* in the chart rendered via SVG. Not a perfect solution but it will have to do.

comment:12 Changed 8 years ago by Tom Trenka

In [27879]:

Show example of how to turn off anti-aliasing for a chart. Refs #6355 !strict

Note: See TracTickets for help on using tickets.