Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graph without fill #3408

Closed
ByronSilvaOlvera opened this issue Feb 28, 2023 · 5 comments
Closed

Graph without fill #3408

ByronSilvaOlvera opened this issue Feb 28, 2023 · 5 comments

Comments

@ByronSilvaOlvera
Copy link

This is:
Hello, how do I make the charts do not have padding. When sorting the graph,
the filling is white. I can't remove the padding.

Graphic 1 has a white background. Graph 2 contains no padding. I want the code of a graph without padding. I await your response, thank you
chart

@oleibman
Copy link
Collaborator

I believe this will do what you want.

$chart->setNoFill(true);

You can also get the same result in Excel by right-clicking on the Chart, choosing "Format Chart Area", "Fill", "No Fill".

@ByronSilvaOlvera
Copy link
Author

Excellent!

@ByronSilvaOlvera
Copy link
Author

Now. I can't change the color of Title. I have the following code

$labelLayoutText = new Layout();
$labelLayoutText
->setLabelFontColor( new ChartColor('FFFFFF') )
;
$title = new Title( $data[$key]['title'] , $labelLayoutText );

@oleibman
Copy link
Collaborator

oleibman commented Mar 2, 2023

I am not sure if there is a way to use Layout for this purpose. However, this will set your Chart title to red:

$richText = new RichText();
$run = $richText->createTextRun('VENTAS EN UNIDADES POR MES');
$run->getFont()->setChartColor(['value' => 'ff0000']);
$run->getFont()->setSize(18)->setBold(true);
$title = new Title($richText);

@oleibman
Copy link
Collaborator

oleibman commented Mar 2, 2023

The x-axis and y-axis titles can be handled in the same way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants