-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ToolTips #1305
Comments
There is a hacky workaround for the plugin v0.1.4 to work with Chartist v1 UMD version. The chart classes have to be aliased, because <html>
<head>
<title>Chartist test</title>
<script src="node_modules/chartist/dist/index.umd.js"></script>
<script src="node_modules/chartist-plugin-tooltips-updated/dist/chartist-plugin-tooltip.min.js"></script>
<link rel="stylesheet" href="node_modules/chartist/dist/index.css">
<link rel="stylesheet" href="node_modules/chartist-plugin-tooltips-updated/dist/chartist-plugin-tooltip.css">
</head>
<body>
<div id="chart" style="height: 50vh"></div>
<script>
/* Dirty hack to make the tooltip plugin compatible with Chartist v1.
The chart classes have been renamed, but functionality remains unchanged, so we define aliases. */
Chartist.Bar = Chartist.BarChart;
Chartist.Pie = Chartist.PieChart;
Chartist.Line = Chartist.LineChart;
new Chartist.LineChart(
'#chart',
{
labels: [1, 2, 3, 4, 5, 6, 7, 8],
series: [[5, 9, 7, 8, 5, 3, 5, 4]]
},
{
low: 0,
showArea: true,
plugins: [ Chartist.plugins.tooltip() ]
}
);
</script>
</body>
</html> I know, that's not perfect, but it does the job for now. However, there is some work in progress updating the plugin I'll keep you updated when there is anything to be published. |
Hi, is there any updates regarding this feature/plugin ? |
From what I can tell in the docs, There is nothing on Tooltips, I'd like a little more information on my charts when I hover over something, especially for my clients.
The text was updated successfully, but these errors were encountered: