How to make the bar be a button?
$begingroup$
This is a BarChart
:
BarChart[Tooltip[#, "I want tip"] & /@ {1, 2, 3},
ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
I hope when I left-right the bar, then I copy the value into the clipboard. Is it possible?
charts
$endgroup$
|
show 3 more comments
$begingroup$
This is a BarChart
:
BarChart[Tooltip[#, "I want tip"] & /@ {1, 2, 3},
ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
I hope when I left-right the bar, then I copy the value into the clipboard. Is it possible?
charts
$endgroup$
1
$begingroup$
how about clicking the bar:Deploy@BarChart[Button[#, CopyToClipboard[#]] & /@ {1, 2, 3}, ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
?
$endgroup$
– kglr
4 hours ago
$begingroup$
@kglr I'm sorry I make a little tuning in the origin question. Actually I want theButton
andTooltip
coexsit...
$endgroup$
– yode
4 hours ago
$begingroup$
Tooltip is not removed. If the tooltips are removed in your version/os, you can useButton[Tooltip@#, CopyToClipboard[#]] &
as wrapper (You might want to add the optionPerformanceGoal -> "Quality"
if there are many bars in your chart).
$endgroup$
– kglr
4 hours ago
$begingroup$
@kglr Do you meanBarChart[Button[Tooltip[#, "I want tip"], #] & /@ {1, 2, 3}, ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
work for you? My version is 11.2..
$endgroup$
– yode
4 hours ago
$begingroup$
@kglr The code can draw the bar graphics here, but it cannot copy the value into the clipboard. Please check....
$endgroup$
– yode
4 hours ago
|
show 3 more comments
$begingroup$
This is a BarChart
:
BarChart[Tooltip[#, "I want tip"] & /@ {1, 2, 3},
ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
I hope when I left-right the bar, then I copy the value into the clipboard. Is it possible?
charts
$endgroup$
This is a BarChart
:
BarChart[Tooltip[#, "I want tip"] & /@ {1, 2, 3},
ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
I hope when I left-right the bar, then I copy the value into the clipboard. Is it possible?
charts
charts
edited 4 hours ago
yode
asked 4 hours ago
yodeyode
10.2k234100
10.2k234100
1
$begingroup$
how about clicking the bar:Deploy@BarChart[Button[#, CopyToClipboard[#]] & /@ {1, 2, 3}, ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
?
$endgroup$
– kglr
4 hours ago
$begingroup$
@kglr I'm sorry I make a little tuning in the origin question. Actually I want theButton
andTooltip
coexsit...
$endgroup$
– yode
4 hours ago
$begingroup$
Tooltip is not removed. If the tooltips are removed in your version/os, you can useButton[Tooltip@#, CopyToClipboard[#]] &
as wrapper (You might want to add the optionPerformanceGoal -> "Quality"
if there are many bars in your chart).
$endgroup$
– kglr
4 hours ago
$begingroup$
@kglr Do you meanBarChart[Button[Tooltip[#, "I want tip"], #] & /@ {1, 2, 3}, ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
work for you? My version is 11.2..
$endgroup$
– yode
4 hours ago
$begingroup$
@kglr The code can draw the bar graphics here, but it cannot copy the value into the clipboard. Please check....
$endgroup$
– yode
4 hours ago
|
show 3 more comments
1
$begingroup$
how about clicking the bar:Deploy@BarChart[Button[#, CopyToClipboard[#]] & /@ {1, 2, 3}, ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
?
$endgroup$
– kglr
4 hours ago
$begingroup$
@kglr I'm sorry I make a little tuning in the origin question. Actually I want theButton
andTooltip
coexsit...
$endgroup$
– yode
4 hours ago
$begingroup$
Tooltip is not removed. If the tooltips are removed in your version/os, you can useButton[Tooltip@#, CopyToClipboard[#]] &
as wrapper (You might want to add the optionPerformanceGoal -> "Quality"
if there are many bars in your chart).
$endgroup$
– kglr
4 hours ago
$begingroup$
@kglr Do you meanBarChart[Button[Tooltip[#, "I want tip"], #] & /@ {1, 2, 3}, ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
work for you? My version is 11.2..
$endgroup$
– yode
4 hours ago
$begingroup$
@kglr The code can draw the bar graphics here, but it cannot copy the value into the clipboard. Please check....
$endgroup$
– yode
4 hours ago
1
1
$begingroup$
how about clicking the bar:
Deploy@BarChart[Button[#, CopyToClipboard[#]] & /@ {1, 2, 3}, ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
?$endgroup$
– kglr
4 hours ago
$begingroup$
how about clicking the bar:
Deploy@BarChart[Button[#, CopyToClipboard[#]] & /@ {1, 2, 3}, ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
?$endgroup$
– kglr
4 hours ago
$begingroup$
@kglr I'm sorry I make a little tuning in the origin question. Actually I want the
Button
and Tooltip
coexsit...$endgroup$
– yode
4 hours ago
$begingroup$
@kglr I'm sorry I make a little tuning in the origin question. Actually I want the
Button
and Tooltip
coexsit...$endgroup$
– yode
4 hours ago
$begingroup$
Tooltip is not removed. If the tooltips are removed in your version/os, you can use
Button[Tooltip@#, CopyToClipboard[#]] &
as wrapper (You might want to add the option PerformanceGoal -> "Quality"
if there are many bars in your chart).$endgroup$
– kglr
4 hours ago
$begingroup$
Tooltip is not removed. If the tooltips are removed in your version/os, you can use
Button[Tooltip@#, CopyToClipboard[#]] &
as wrapper (You might want to add the option PerformanceGoal -> "Quality"
if there are many bars in your chart).$endgroup$
– kglr
4 hours ago
$begingroup$
@kglr Do you mean
BarChart[Button[Tooltip[#, "I want tip"], #] & /@ {1, 2, 3}, ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
work for you? My version is 11.2..$endgroup$
– yode
4 hours ago
$begingroup$
@kglr Do you mean
BarChart[Button[Tooltip[#, "I want tip"], #] & /@ {1, 2, 3}, ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
work for you? My version is 11.2..$endgroup$
– yode
4 hours ago
$begingroup$
@kglr The code can draw the bar graphics here, but it cannot copy the value into the clipboard. Please check....
$endgroup$
– yode
4 hours ago
$begingroup$
@kglr The code can draw the bar graphics here, but it cannot copy the value into the clipboard. Please check....
$endgroup$
– yode
4 hours ago
|
show 3 more comments
2 Answers
2
active
oldest
votes
$begingroup$
You can wrap input data with Button
with action CopyToClipboard
:
BarChart[Button[Tooltip[#, "I want tip"], CopyToClipboard@#] & /@ {1, 2, 3},
ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
$endgroup$
add a comment |
$begingroup$
This is to get a slightly modified version of kglr's comments recorded as an answer. The modification is provide individual tooltips for each bar.
BarChart[
MapThread[
Button[Tooltip[#1, #2], CopyToClipboard@#1] &,
{{1, 2, 3}, {"left", "mid", "right"}}],
ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
.1
Also, be aware that if only want the tooltip to show the value of the bar, you don't need to specify Tooltip
; it will be supplied automatically.
BarChart[Button[#, CopyToClipboard@#] & /@ {1, 2, 3},
ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "387"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f190147%2fhow-to-make-the-bar-be-a-button%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
You can wrap input data with Button
with action CopyToClipboard
:
BarChart[Button[Tooltip[#, "I want tip"], CopyToClipboard@#] & /@ {1, 2, 3},
ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
$endgroup$
add a comment |
$begingroup$
You can wrap input data with Button
with action CopyToClipboard
:
BarChart[Button[Tooltip[#, "I want tip"], CopyToClipboard@#] & /@ {1, 2, 3},
ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
$endgroup$
add a comment |
$begingroup$
You can wrap input data with Button
with action CopyToClipboard
:
BarChart[Button[Tooltip[#, "I want tip"], CopyToClipboard@#] & /@ {1, 2, 3},
ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
$endgroup$
You can wrap input data with Button
with action CopyToClipboard
:
BarChart[Button[Tooltip[#, "I want tip"], CopyToClipboard@#] & /@ {1, 2, 3},
ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
answered 3 hours ago
kglrkglr
180k9200413
180k9200413
add a comment |
add a comment |
$begingroup$
This is to get a slightly modified version of kglr's comments recorded as an answer. The modification is provide individual tooltips for each bar.
BarChart[
MapThread[
Button[Tooltip[#1, #2], CopyToClipboard@#1] &,
{{1, 2, 3}, {"left", "mid", "right"}}],
ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
.1
Also, be aware that if only want the tooltip to show the value of the bar, you don't need to specify Tooltip
; it will be supplied automatically.
BarChart[Button[#, CopyToClipboard@#] & /@ {1, 2, 3},
ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
$endgroup$
add a comment |
$begingroup$
This is to get a slightly modified version of kglr's comments recorded as an answer. The modification is provide individual tooltips for each bar.
BarChart[
MapThread[
Button[Tooltip[#1, #2], CopyToClipboard@#1] &,
{{1, 2, 3}, {"left", "mid", "right"}}],
ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
.1
Also, be aware that if only want the tooltip to show the value of the bar, you don't need to specify Tooltip
; it will be supplied automatically.
BarChart[Button[#, CopyToClipboard@#] & /@ {1, 2, 3},
ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
$endgroup$
add a comment |
$begingroup$
This is to get a slightly modified version of kglr's comments recorded as an answer. The modification is provide individual tooltips for each bar.
BarChart[
MapThread[
Button[Tooltip[#1, #2], CopyToClipboard@#1] &,
{{1, 2, 3}, {"left", "mid", "right"}}],
ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
.1
Also, be aware that if only want the tooltip to show the value of the bar, you don't need to specify Tooltip
; it will be supplied automatically.
BarChart[Button[#, CopyToClipboard@#] & /@ {1, 2, 3},
ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
$endgroup$
This is to get a slightly modified version of kglr's comments recorded as an answer. The modification is provide individual tooltips for each bar.
BarChart[
MapThread[
Button[Tooltip[#1, #2], CopyToClipboard@#1] &,
{{1, 2, 3}, {"left", "mid", "right"}}],
ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
.1
Also, be aware that if only want the tooltip to show the value of the bar, you don't need to specify Tooltip
; it will be supplied automatically.
BarChart[Button[#, CopyToClipboard@#] & /@ {1, 2, 3},
ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
answered 3 hours ago
community wiki
m_goldberg
add a comment |
add a comment |
Thanks for contributing an answer to Mathematica Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f190147%2fhow-to-make-the-bar-be-a-button%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
$begingroup$
how about clicking the bar:
Deploy@BarChart[Button[#, CopyToClipboard[#]] & /@ {1, 2, 3}, ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
?$endgroup$
– kglr
4 hours ago
$begingroup$
@kglr I'm sorry I make a little tuning in the origin question. Actually I want the
Button
andTooltip
coexsit...$endgroup$
– yode
4 hours ago
$begingroup$
Tooltip is not removed. If the tooltips are removed in your version/os, you can use
Button[Tooltip@#, CopyToClipboard[#]] &
as wrapper (You might want to add the optionPerformanceGoal -> "Quality"
if there are many bars in your chart).$endgroup$
– kglr
4 hours ago
$begingroup$
@kglr Do you mean
BarChart[Button[Tooltip[#, "I want tip"], #] & /@ {1, 2, 3}, ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"]
work for you? My version is 11.2..$endgroup$
– yode
4 hours ago
$begingroup$
@kglr The code can draw the bar graphics here, but it cannot copy the value into the clipboard. Please check....
$endgroup$
– yode
4 hours ago