jQWidgets Forums

jQuery UI Widgets Forums Chart Formatting numbers for Line Chart Tooltip

This topic contains 4 replies, has 3 voices, and was last updated by  xiaoyuandlg 11 years, 5 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Formatting numbers for Line Chart Tooltip #42336

    nisha
    Participant

    How would I add a $ sign and ‘,’ separator for numbers in the line chart tooltip?

    Formatting numbers for Line Chart Tooltip #43480

    Dimitar
    Participant

    Hello nisha,

    You can achieve this with the toolTipFormatSettings callback function, e.g.:

    seriesGroups:
        [
            {
                type: 'line',
                toolTipFormatSettings: { prefix: "$", decimalSeparator: "," },
                valueAxis:
                {
                    unitInterval: 500,
                    minValue: 0,
                    maxValue: 3000,
                    displayValueAxis: true,
                    description: 'Daily Closing Price',
                    axisSize: 'auto',
                    tickMarksColor: '#888888'
                },
                series: [
                        { dataField: 'S&P 500', displayText: 'S&P 500' },
                        { dataField: 'NASDAQ', displayText: 'NASDAQ' }
                    ]
            }
        ]

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/


    nisha
    Participant

    As suggested, I tried using toolTipFormatSettings: { prefix: “$”, decimalSeparator: “,” } for the tooltip
    and formatSettings: { decimalSeparator: “,”, prefix: “$” } for the y axis.
    The $ sign appears correctly before the number on both the y axis and tooltip.
    However the commas do not appear on the y axis or in the tooltip.
    Any ideas what the issue could be?
    Thanks

    Formatting numbers for Line Chart Tooltip #46024

    Dimitar
    Participant

    Hello nisha,

    This solution works fine on our side. Please provide us with a code sample that demonstrates the reported issue. Also make sure you are using version 3.0.4 of jQWidgets.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/


    xiaoyuandlg
    Participant

    <font color=”#1982D1″>I’ve been trying to use another line chart and encountered the similar question, feel so happy to find a solution here.</font>

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.