{"id":6616,"date":"2016-07-26T16:54:44","date_gmt":"2016-07-26T20:54:44","guid":{"rendered":"http:\/\/blog.originlab.com\/?p=6616"},"modified":"2022-05-27T09:28:01","modified_gmt":"2022-05-27T13:28:01","slug":"quick-way-to-remove-sparklines-in-origin","status":"publish","type":"post","link":"https:\/\/blog.originlab.com\/ja\/quick-way-to-remove-sparklines-in-origin","title":{"rendered":"Quick Way to Remove Sparklines in Origin"},"content":{"rendered":"<p><span style=\"color: #0000ff;\"><em>Updated: 5\/26\/2022<\/em><\/span><\/p>\n<p><a href=\"http:\/\/www.originlab.com\/doc\/Quick-Help\/Sparkline\">Sparkline<\/a>\u00a0is a nice feature in Origin to quickly view the shape or distribution of the data across many columns without having to create graph windows.<\/p>\n<p><a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/07\/sparklines_blog1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6618 alignnone\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/07\/sparklines_blog1.png\" alt=\"sparklines_blog1\" width=\"689\" height=\"442\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/07\/sparklines_blog1.png 916w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/07\/sparklines_blog1-300x193.png 300w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/07\/sparklines_blog1-768x493.png 768w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/07\/sparklines_blog1-80x50.png 80w\" sizes=\"auto, (max-width: 689px) 100vw, 689px\" \/><\/a><\/p>\n<p>Each sparkline object is in fact an embedded graph so it can make your opj file size big and also slow things down such as importing data, openning the opj or switch folders in the project. That&#8217;s why by default we only add sparklines for data file with less than 50 columns. But it may happen that all your data files have less than 50 columns and you import a lot of data files. Then sparklines will be added during\u00a0import to all columns.\u00a0In such case, we would recommend you set <strong>Add Sparklines<\/strong> to <strong>No<\/strong> in Import dialogs, such as the following in ASCII Import dialog:<\/p>\n<p><a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/07\/sparklines_blog3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6637 alignnone\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/07\/sparklines_blog3.png\" alt=\"sparklines_blog3\" width=\"480\" height=\"447\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/07\/sparklines_blog3.png 589w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/07\/sparklines_blog3-300x280.png 300w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/a><\/p>\n<h3>Version 2022b (and Later)<\/h3>\n<p>Beginning with <strong>Origin 2022b<\/strong>, you have two easy options for removing sparklines:<\/p>\n<ul>\n<li>To <em>control display<\/em> (e.g. prevent creation of new sparklines, plus hide existing sparklines on loading of project),\u00a0 use LabTalk system variable <a href=\"https:\/\/www.originlab.com\/doc\/LabTalk\/ref\/sys-var-list#S\"><strong>@SPK<\/strong><\/a>.<\/li>\n<li>To <i>delete <\/i>sparklines from the current project, use the LabTalk <a href=\"https:\/\/www.originlab.com\/doc\/LabTalk\/ref\/Delete-cmd#-spk.3B_Delete_all_project_sparklines\"><strong>delete<\/strong> <\/a>command.\u00a0 Open the Script Window <strong>(Window: Script Window<\/strong>), type the following and press Enter:<\/li>\n<\/ul>\n<pre>del -spk<\/pre>\n<h3>Version 2022 and Earlier<\/h3>\n<p>If you already have a project file with all sparklines in columns. Removing all these sparklines manually will be time consuming. So here we made a user-defined toolbar <a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/07\/Sparklines.zip\">Sparklines.zip<\/a>. Please download the zip file and unzip it. Then drag and drop the opx file into your running Origin workspace to install it.<\/p>\n<p>A toolbar with two toolbar buttons will appear.<\/p>\n<p><a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/07\/sparklines_blog2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6628\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/07\/sparklines_blog2.png\" alt=\"sparklines_blog2\" width=\"46\" height=\"45\" \/><\/a><\/p>\n<p>Clicking the 1st button to\u00a0deletes all sparklines in the opj.\u00a0 Note: There is refresh issue so you may still see the sparklines in worksheet. But if you click on the worksheet, or switch between folders, the sparklines will be gone.<\/p>\n<p>Click on the 2nd button to add sparklines to all columns in active sheet.<\/p>\n<p>Here are the codes behind each button.<\/p>\n<p>Delete\u00a0Sparklines in whole opj file:<\/p>\n<pre class=\"lang:c++ decode:true\" title=\"LT code to delete all sparklines in the opj\">\/\/start of the code\n\nstringarray sa;\n\ndoc -e P \/\/loop through all objects in project\n{\nif (%H == \"sparklin*\")\nsa.Add(%H);\n}\n\nint nn = sa.GetSize();\nfor (int ii=1; ii&lt;=nn; ii++)\n{\nwin -c %(sa.GetAt(ii)$);\n}\n\n\/\/end of the code\n<\/pre>\n<p>Add Sparklines to all columns in active sheet:<\/p>\n<pre class=\"lang:c++ decode:true\" title=\"LT code to add Sparklines to all columns in active sheet\">sparklines sel:=0;\n<\/pre>","protected":false},"excerpt":{"rendered":"<p>Updated: 5\/26\/2022 Sparkline\u00a0is a nice feature in Origin to quickly &hellip; <\/p>","protected":false},"author":4,"featured_media":6618,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[103,12],"tags":[],"class_list":["post-6616","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programming-labtalk","category-data-import"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7DvU2-1II","jetpack_likes_enabled":true,"jetpack_featured_media_url":"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/07\/sparklines_blog1.png","post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/posts\/6616","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/comments?post=6616"}],"version-history":[{"count":23,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/posts\/6616\/revisions"}],"predecessor-version":[{"id":17238,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/posts\/6616\/revisions\/17238"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/media\/6618"}],"wp:attachment":[{"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/media?parent=6616"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/categories?post=6616"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/tags?post=6616"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}