lichtkind / Chart

a series of charting modules
https://metacpan.org/pod/Chart
5 stars 4 forks source link

`flip_composite_order` for Composite #4

Closed CindyLinz closed 2 years ago

CindyLinz commented 2 years ago

Hello~

I need this function on Composite, to layer the first component above the second one. I've checked it functioning well. But I don't know how to let the document modification show up in the Document.pdf...

lichtkind commented 2 years ago

Thank you for the request. Please do not worry abut the pdf it will be obsolete soon anyway. I t seems to me you want to fine tune the rendering order. why not feed the data in the order you want to have rendered? I also ask in case we come up maybe with a more general solution not only serving your case. Blessings

CindyLinz commented 2 years ago

The data order determined the position of the y-axis. And Composite only plots the horizontal grid lines (y_grid_lines) for the first component. I need the y-axis of the above component positioned to the left with the grid lines. If I feed the data in different order, the y-axis of the above component will be on the right and no grid lines for it anymore.

CindyLinz commented 2 years ago

FYI, I use the alternative version to plot the graph -- Covid-19 daily confirmed cases and 7-day average growth rate in Taiwan Covid-19 cases and R in Taiwan

lichtkind commented 2 years ago

Allright, you want the drawing of the coordinate system irrespectively of the data set order and you want to be able to set what goes on left or right y axis. I think now i got it. That is reasonable, but not sure how i do it. maybe it will only show up in the complete rewrite i currently plan. there is so much to clean up and what you want is not easy simple because there is so much inflexible code. I have to approach this whole problem with a lower hanging fruit: drawing the legend. Hope you can still hold out as long.

CindyLinz commented 2 years ago

Sure. I can temporarily use my local modified version. lol

lichtkind commented 2 years ago

good, congrats on Return::Deep, I'm one of the weirdo who actually like to use something like that. And to be transparent my main goal is to have a chart module with first class smooth optics. What you want would be just a side effect of doing it properly.

lichtkind commented 2 years ago

allright closing this now. if your interested look into progress at /dev/function were i test out things. Next release will even support chinese characters (UTF), but i think when all is hopefully done you will be more than happy with result.