Skip to content
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

How to insert sparkline graph to cell #7269

Closed
trzhou opened this issue Apr 6, 2024 · 1 comment
Closed

How to insert sparkline graph to cell #7269

trzhou opened this issue Apr 6, 2024 · 1 comment
Labels
help-wanted Issues we need or would love help from the community to resolve.

Comments

@trzhou
Copy link

trzhou commented Apr 6, 2024

Description

I want use jquery.sparkline ( https://github.com/gwatts/jquery.sparkline.git ) showing sparkline graph in table cell. I don't know how to do it. I hope to get some guidance and help. Thanks!

Example(s)

No response

@trzhou trzhou added the help-wanted Issues we need or would love help from the community to resolve. label Apr 6, 2024
@trzhou
Copy link
Author

trzhou commented Apr 6, 2024

Resolved.

Column:
.......
{
field: 'valuelist',
title: 'graph',
width: 200,
visible: true,
align: 'center',
valign: 'middle',
sortable: false,
printIgnore: true,

    formatter: (value, row) => {
        return `<span class="inlinebar">${value}</span>`
    },
    switchable: true,
}

......

$('#table').on('load-success.bs.table', function (e, data) {
$('.inlinebar').sparkline('html', { type: 'bar' });
});

@trzhou trzhou closed this as completed Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help-wanted Issues we need or would love help from the community to resolve.
Projects
None yet
Development

No branches or pull requests

1 participant