Search code examples
javascriptformatfusioncharts

FusionChart with only one time range


I´m use fusionChart for show a graphics, I want graphics only in this format 03/04/2022 00:20 , 03/04/2022 00:40 ... but when change the size of graphic change the format time, any idea for the format time always the same??

enter image description here

Becasue when change the size of my screen , the time change

enter image description here


Solution

  • You can customize the output time format for each time unit by specifying date-time tokens for respective time format.

        "xAxis": {
        outputTimeFormat: {
            //year: "",
            month: "%b'%y (%q)",
            day: "%d/%m (%a)",
            //hour: "",
            //minute: "",
            //second: "",
            //millisecond: ""
        }
    }
    

    To know more about this feature please refer - https://www.fusioncharts.com/dev/fusiontime/getting-started/output-time-format

    https://www.fusioncharts.com/dev/fusiontime/fusiontime-attributes#date-time-format

    I hope it will help you out, if not please share your case in sample fiddle.