Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 14126

Use a period (.) to separate thousands in the highchart tooltip

$
0
0

Although I have researched many ways to use a period (.) to separate thousands in the highchart tooltip, it does not seem to work. For example, 'lang': { 'thousandsSep': '.' }."

This sentence expresses frustration with trying different methods to use a period for thousands separation in a Highcharts tooltip but experiencing issues, as shown in the provided example.

from highcharts_core.chart import Chartas_dict = {'chart': {'type': 'column','style': {"fontSize": "1.7rem",'fontFamily': 'Helvetica'        },'height': 600    },'title': {'text': 'Major trophies for some English teams','align': 'center'    },'xAxis': {'categories': df_chart_1.index.to_list(),'lineColor': 'while'    },'yAxis': [{'title': {'text': 'Count trophies'        },'stackLabels': {'enabled': True        },'stackLabels': {'enabled': False  # Hiển thị số tổng        }    },{'min': -3,'title': {'text': 'Additional Data'        },'labels': {'format': '{value}%',        },'opposite': True    }],'legend': {'align': 'center','layout': 'horizontal','verticalAlign': 'bottom','backgroundColor': 'white','borderColor': '#CCC','borderWidth': 1,'shadow': False,    },'tooltip': {'shared': False,  # Tắt chia sẻ tooltip giữa các series,'hideDelay':10    },'plotOptions': {'column': {'stacking': 'normal','dataLabels': {'enabled': False,'formatter': "function() { return this.y.toFixed(2); }"            },'tooltip': {'headerFormat': '<b>{point.x}</b><br/>','pointFormat': '{series.name}: {point.y:,.2f} ({point.percentage:.1f}%)<br/>','usehtml': True            }        },'spline': {'dataLabels': {'enabled': True,'formatter': "function() { return this.y.toFixed(2); }"             },'tooltip': {'headerFormat': '<b>{point.x}</b><br/>','pointFormat': '{series.name}: {point.y:,.2f}<br/>',            }        },'series': {'stickyTracking': False        }    },'series': [{'name': 'Nợ nhóm 2','data': df_chart_1[748].to_list(),'color':'#C6DBD0','visible': False    }, {'name': 'Nợ nhóm 3','data': df_chart_1[749].to_list(),'color':'#C6DBD0'    }, {'name': 'Nợ nhóm 4','data': df_chart_1[750].to_list(),'color':'#9ECBED'    }, {'name': 'Nợ nhóm 5','data': df_chart_1[751].to_list(),'color':'#3C97DA'    }, {'type': 'spline','yAxis': 1,'name': 'Tỷ lệ nợ xấu','data': df_chart_1['Tỷ lệ nợ xấu'].to_list(),    }],'lang': {'thousandsSep': '\u002C'    },}chart = Chart(options = as_dict)chart.display()

point.y:,.2f not working'pointFormat': '{series.name}: {point.y:,.2f} ({point.percentage:.1f}%)<br/>'It still uses a space to separate thousands, not the period (.) as intended.


Viewing all articles
Browse latest Browse all 14126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>