简体   繁体   中英

How to create a pie chart for yes and no answers in Spotfire and not display the Percentage of Yes/No?

I am trying to create a Pie chart as markers in Spotfire map to Show Yes/No answers. How do I do to Display yes and No in pie Sector's instead of Percentage? I am attaching an Excel Spreadsheet with Data with this.

I am expecting to get individual Pie chart for each well in the Spotfire map. For example for WELL_1 Data, the pie chart should have two sectors of two different colors one for YES and one for NO and Sector 1 Should show PRODUCTION, COMPLETION Labels(for yes Category) inside the sector and the Other sector Should show PVT, Image Lables (for no category).

I have tried using the Pie marker option in Spotfire Settings, but not getting the result I am expecting. Any help would be appreciated.

enter image description here . enter image description here

while Spotfire excels at reading data up and down columns, it's not really designed to read left to right across rows.

you will need to unpivot your table to be tall-and-skinny instead of short-and-wide.

I recommend to start by adding a linked copy of your data table. this way your original table isn't changed, so any visualizations you've already built won't break.

since you haven't specified your Spotfire version, I'll assume you're using 10.x, and my screenshots will reflect that. I'll also be calling your original table Data Table , because I'm lazy and didn't change it in my screenshots ;)

  1. click the + icon in the top left corner
  2. click Other
  3. under "Linked copy to data table in analysis", choose your Data Table
  4. rename the new table to Data Table unpivot to distinguish it, then click OK
  5. from the Data menu, click Transform data...
  6. select Unpivot from the dropdown, then click Insert
  7. configure the transformation像这样
  8. click OK until you get back to the canvas
  9. from the Data menu, click Add calculated column
  10. enter an expression like the following

CASE WHEN [Category] in ("PRODUCTION", "COMPLETION") THEN "Sector 1" WHEN [Category] in ("PVT", "IMAGE") THEN "Other" END

  1. call this column something like Sector

now that you've got the data configured, you can set up the pie chart as needed. here's a sample of that which I put together quickly. I set up the pies on a trellis to illustrate how it might look in your map.

最后结果

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM