{"action":"created","issue":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/5385","repository_url":"https://api.github.com/repos/bokeh/bokeh","labels_url":"https://api.github.com/repos/bokeh/bokeh/issues/5385/labels{/name}","comments_url":"https://api.github.com/repos/bokeh/bokeh/issues/5385/comments","events_url":"https://api.github.com/repos/bokeh/bokeh/issues/5385/events","html_url":"https://github.com/bokeh/bokeh/issues/5385","id":184026817,"number":5385,"title":"Legend labels expand keys even when not preceded by @","user":{"login":"guillochon","id":4998058,"avatar_url":"https://avatars.githubusercontent.com/u/4998058?v=3","gravatar_id":"","url":"https://api.github.com/users/guillochon","html_url":"https://github.com/guillochon","followers_url":"https://api.github.com/users/guillochon/followers","following_url":"https://api.github.com/users/guillochon/following{/other_user}","gists_url":"https://api.github.com/users/guillochon/gists{/gist_id}","starred_url":"https://api.github.com/users/guillochon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guillochon/subscriptions","organizations_url":"https://api.github.com/users/guillochon/orgs","repos_url":"https://api.github.com/users/guillochon/repos","events_url":"https://api.github.com/users/guillochon/events{/privacy}","received_events_url":"https://api.github.com/users/guillochon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bokeh/bokeh/labels/reso:%20invalid","name":"reso: invalid","color":"345065"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-19T17:34:42Z","updated_at":"2016-10-19T17:47:20Z","closed_at":null,"body":"It appears that the parser of the legend label is a bit overzealous at the moment, it will replace labels that match dictionary names even when not preceded by an @ symbol. This leads to legends that are labeled by plot values, rather than the desired label name. As an example, in the plot below  the green points should be labeled by the letter `y`, which happens to match the `y` key in the `ColumnDataSource`.\r\n\r\n<img width=\"485\" alt=\"screenshot 2016-10-19 13 29 29\" src=\"https://cloud.githubusercontent.com/assets/4998058/19530032/1fde25ea-9600-11e6-97b3-3737d79b880f.png\">\r\n\r\n```Python    \r\np1.circle(\r\n    'x',\r\n    'y',\r\n    source=sources[-1],\r\n    color=bandcolorf(band),\r\n    fill_color=\"white\",\r\n    legend=bandname,\r\n    size=4)\r\n```\r\n\r\nIf I replace the letter `y` with something else that doesn't match any `ColumnDataSource` keys (in this case a capital `Y`), the label appears correctly:\r\n\r\n<img width=\"491\" alt=\"screenshot 2016-10-19 13 34 20\" src=\"https://cloud.githubusercontent.com/assets/4998058/19530180/c1b4df12-9600-11e6-8595-88cc46d4a650.png\">\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/comments/254888338","html_url":"https://github.com/bokeh/bokeh/issues/5385#issuecomment-254888338","issue_url":"https://api.github.com/repos/bokeh/bokeh/issues/5385","id":254888338,"user":{"login":"bryevdv","id":1078448,"avatar_url":"https://avatars.githubusercontent.com/u/1078448?v=3","gravatar_id":"","url":"https://api.github.com/users/bryevdv","html_url":"https://github.com/bryevdv","followers_url":"https://api.github.com/users/bryevdv/followers","following_url":"https://api.github.com/users/bryevdv/following{/other_user}","gists_url":"https://api.github.com/users/bryevdv/gists{/gist_id}","starred_url":"https://api.github.com/users/bryevdv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryevdv/subscriptions","organizations_url":"https://api.github.com/users/bryevdv/orgs","repos_url":"https://api.github.com/users/bryevdv/repos","events_url":"https://api.github.com/users/bryevdv/events{/privacy}","received_events_url":"https://api.github.com/users/bryevdv/received_events","type":"User","site_admin":false},"created_at":"2016-10-19T17:47:20Z","updated_at":"2016-10-19T17:47:20Z","body":"This is a new feature to help generate legends more easily with less code when a single data source has groups of data. You can do one of two things:\r\n\r\n* make the legend label and the column name differ (e.g. rename the column)\r\n* use `legend=value('foo')` to be explicit that you don't want the auto grouping"}}
{"actor":{"display_login":"bryevdv"}}