Line Graph - how can we make it look nice even when antialias doesn't work at all?

@mpappas, thank you for sharing your thoughts.  I’ll pursue the option I’ve chosen for now, but if it doesn’t work, I’ll see how blur filter would fare.  I’m a bit reluctant about doing the snapshot.  I guess I’d have to get over it.  But for now, I like the math approach I’m taking.  (I only need 90 newImageRect objects to achieve what I need for my line graph, so it might just workout fine.)

Naomi

The math route works rather very nicely.  I haven’t tested it on device, but so far, on simulator, it looks quite nice.

Naomi

blur and gaussian blur are horrible they create huge lag on older devices when using snapshots.

with the new fill API you can simply use an image of a single dot or slightly bigger to create a perfectly smooth line.

Hey, @jacques1, I’m wondering how you’d use a single dot to create a perfectly smooth line.  

I use a square-like white image that is 8x8, with top & bottom of the square gradually becoming transparent.  I made @2x and @4x images to make sure it looks good on retina devices too.  I use the image to create each line (and apply fill color).  Unfortunately, the connecting spots get a bit of a crack.  So, in addition to 90 pieces of lines (to make 6 lines total), I add dots on each connecting spot to hide the crack.  I’m happy with how it looks and it’s performing well on iOS devices so far.

Naomi

@Naomi: May you post a screenshot of your results so far? I am currently looking for a way to create some nice line-charts/graphs and this seems to be the only working solution at the moment :confused:

Hey, CineTek, if you could PM your email address, I’ll send you the screen capture of the line graph.  

Cheers,
Naomi

Hey, CineTek, the screen capture of the line graph is on its way to you.

Cheers,

Naomi

P.S.  I just realized I can attach a file to personal message via Corona Messenger here.  Nice to know.

What about creating two lines one on top of the other, only changing stroke and alpha? you make a thinner line with alpha=1, and another slightly thicker line on the back, with a lower alpha like 0.5? It does fix it, but might make it more acceptable…

Or maybe create 1 line as an image, and use several instances of the image to create your graph… this usually does the trick for me.