{"id":28844183,"url":"https://github.com/sharpmap/sharpmap.rendering.thematics.categorytheme","last_synced_at":"2025-07-09T19:40:16.891Z","repository":{"id":16177913,"uuid":"18924350","full_name":"SharpMap/SharpMap.Rendering.Thematics.CategoryTheme","owner":"SharpMap","description":"A categorial theme for SharpMap","archived":false,"fork":false,"pushed_at":"2017-03-21T13:58:04.000Z","size":12,"stargazers_count":5,"open_issues_count":0,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-23T20:24:05.553Z","etag":null,"topics":["gis","sharpmap","thematic-maps"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SharpMap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-18T20:14:20.000Z","updated_at":"2020-02-23T16:00:18.000Z","dependencies_parsed_at":"2022-08-28T05:52:52.442Z","dependency_job_id":null,"html_url":"https://github.com/SharpMap/SharpMap.Rendering.Thematics.CategoryTheme","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/SharpMap/SharpMap.Rendering.Thematics.CategoryTheme","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharpMap%2FSharpMap.Rendering.Thematics.CategoryTheme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharpMap%2FSharpMap.Rendering.Thematics.CategoryTheme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharpMap%2FSharpMap.Rendering.Thematics.CategoryTheme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharpMap%2FSharpMap.Rendering.Thematics.CategoryTheme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SharpMap","download_url":"https://codeload.github.com/SharpMap/SharpMap.Rendering.Thematics.CategoryTheme/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SharpMap%2FSharpMap.Rendering.Thematics.CategoryTheme/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260793408,"owners_count":23064035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gis","sharpmap","thematic-maps"],"created_at":"2025-06-19T17:08:52.998Z","updated_at":"2025-07-09T19:40:16.858Z","avatar_url":"https://github.com/SharpMap.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SharpMap.Rendering.Thematics.CategoryTheme\nA categorial theme for SharpMap\n\n## Create a category theme using value ranges\n```C#\n// Create a category theme that can categorize double values\nvar ct = new CategoryTheme\u003cdouble\u003e();\n// Set the column name that holds the values to categorize\nct.ColumnName = \"Value\";\n// Create a fallback style in case no category item matches\nct.Default =  VectorStyle.CreateRandomStyle(); \n\n// Add category range items. This can be done unordered\nct.Add(new CategoryThemeRangeItem\u003cdouble\u003e { LowerBound = 0d, UpperBound = 5d, Style = VectorStyle.CreateRandomStyle()});\nct.Add(new CategoryThemeRangeItem\u003cdouble\u003e { LowerBound = 10d, UpperBound = 15d, Style = VectorStyle.CreateRandomStyle() });\nct.Add(new CategoryThemeRangeItem\u003cdouble\u003e { LowerBound = 5d, UpperBound = 10d, Style = VectorStyle.CreateRandomStyle() });\nct.Add(new CategoryThemeRangeItem\u003cdouble\u003e { LowerBound = 20d, UpperBound = 25d, Style = VectorStyle.CreateRandomStyle() });\n```\n## Create a category theme using specific values\n```C#\n// Create a category theme that can categorize string values\nvar ct = new CategoryTheme\u003cstring\u003e();\n// Set the column name that holds the values to categorize\nct.ColumnName = \"Value\";\n// Create a fallback style in case no category item matches\nct.Default = VectorStyle.CreateRandomStyle();\n\n// Add category value items. These are not sorted automatically, you have to do that yourself.\nct.Add(new CategoryThemeValuesItem\u003cstring\u003e { Values = new List\u003cstring\u003e { \"A\", \"B\"} , Style = VectorStyle.CreateRandomStyle() });\nct.Add(new CategoryThemeValuesItem\u003cstring\u003e { Values = new List\u003cstring\u003e { \"C\", \"D\" }, Style = VectorStyle.CreateRandomStyle() });\nct.Add(new CategoryThemeValuesItem\u003cstring\u003e { Values = new List\u003cstring\u003e { \"E\", \"F\" }, Style = VectorStyle.CreateRandomStyle() });\nct.Add(new CategoryThemeValuesItem\u003cstring\u003e { Values = new List\u003cstring\u003e { \"G\", \"H\" }, Style = VectorStyle.CreateRandomStyle() });\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpmap%2Fsharpmap.rendering.thematics.categorytheme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharpmap%2Fsharpmap.rendering.thematics.categorytheme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpmap%2Fsharpmap.rendering.thematics.categorytheme/lists"}