dosubot[bot] commented on issue #30960:
URL: https://github.com/apache/superset/issues/30960#issuecomment-2483000180

   <!-- Answer -->
   Currently, there is no documented method to directly set or customize chart 
colors using the `/api/v1/chart/{pk}/cache_screenshot/` endpoint in Superset. 
The `q` parameter and other parameters for this endpoint do not appear to 
support color customization directly 
<sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/cypress-base/cypress/e2e/dashboard/editmode.test.ts)</sup>.
   
   The `label_colors` attribute is used in the dashboard's JSON metadata to map 
specific labels to colors, but this configuration does not automatically apply 
to individual chart downloads through the API 
<sup>[[2]](https://github.com/apache/superset/blob/master/docs/docs/faq.mdx)</sup><sup>[[3]](https://github.com/apache/superset/blob/master/superset/examples/configs/dashboards/Sales_Dashboard.yaml)</sup>.
   
   As a workaround, you might consider setting the `label_colors` in the 
dashboard's metadata and ensuring that the chart reflects these settings when 
viewed in the dashboard. However, for API downloads, you may need to manually 
adjust the chart's color settings in the Superset UI before downloading, as 
there is no direct API support for this feature at the moment.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to