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

   <!-- Greeting -->
   Hey @ltf-space! 👋 I'm here to help you out with any bugs, questions, or 
contributions you have. Let's tackle this together!
   
   <!-- Answer -->
   I found a similar unsolved discussion that might be relevant to your issue: 
[Timeseries chart y/x-axis label 
color](https://github.com/apache/superset/discussions/29651) 
<sup>[[1]](https://github.com/apache/superset/discussions/29651)</sup>.
   
   To change the color of the coordinate axis to white after changing the 
background color to dark in a line graph, you need to modify the axis styling 
in the `updateAxes` function. Specifically, you should set the stroke color of 
the axis to white.
   
   Here is the relevant part of the code with the necessary modification:
   
   ```js
   pc.updateAxes = function () {
       var g_data = pc.svg.selectAll('.dimension').data(__.dimensions);
   
       // Enter
       g_data
         .enter()
         .append('svg:g')
         .attr('class', 'dimension')
         .attr('transform', function (p) {
           return 'translate(' + position(p) + ')';
         })
         .style('opacity', 0)
         .append('svg:g')
         .attr('class', 'axis')
         .attr('transform', 'translate(0,0)')
         .each(function (d) {
           d3.select(this).call(axis.scale(yscale[d]));
         })
         .selectAll('path, line')
         .style('stroke', 'white')  // Set axis color to white
         .append('svg:text')
         .attr({
           'text-anchor': 'middle',
           y: 0,
           transform: 'translate(0,-5) rotate(' + __.dimensionTitleRotation + 
')',
           x: 0,
           class: 'label',
         })
         .text(dimensionLabels)
         .on('dblclick', flipAxisAndUpdatePCP)
         .on('wheel', rotateLabels);
   };
   ```
   
   This modification ensures that the axis lines and paths are styled with a 
white stroke, making them visible against a dark background 
<sup>[[2]](https://github.com/apache/superset/blob/master/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/vendor/parcoords/d3.parcoords.js)</sup>.
   
   
   <!-- 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: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to