Hi Chaitanya,
The charts in Mendix use Plotly to visualize the data.
If you add this JSON to the custom layout in the advanced tab, you should get a black background:
{"plot_bgcolor": "rgb(17,17,17)","paper_bgcolor": "rgb(17,17,17)"}
You can check this post for more in depth explanation: https://community.mendix.com/link/space/ui-&-front-end/exchanges/136
The code I provided won't change the color of text and the chart itself. With Plotly studio, you can design a chart and import the JSON in Mendix. That way, the chart is exactly the way you want it.