score:6

Have you tried using a function for the format property? You can use it to transform the value any way you want.

I like the dates in my data to be Unix timestamps. That helps me stay flexible how to display them differently across components. The example below uses the Moment.js library to help with date formatting, but it works with anything really.

<ResponsiveLine
    axisBottom={{
        format: function(value){ 
            return moment.unix(value).format('MMMM Do YYYY, h:mm');
        }
    }}
    // other props
/>

It would help if you supplied a minimal working example (for instance a codepen or jsfiddle), because the solution depends on the structure of your data. And it will make finding the solution for your specific case easier and more fun :-)


Related Query

More Query from same tag