Forum Discussion
Adding More than One Type of Data View Mapping to Developer Visual
Using D3 and typescript, I'm trying to create a custom Power BI visual that incorporates two Cards ("Measure Card" and "Variance Indicator") and one Line Area Chart with three different series (Actuals, Target, and Forecast) for various dates. The two Cards and line area chart should be able to take in different data and not be affected by data that's entered for the other displays. However, I'm having trouble with the data view mappings in capabilities.json. The problems are two fold:
1) Intuitively, it seems as though I'd just need two different types of data view mapping: single for the cards and categorical for the line area chart. However, when I implement these changes, the visual does not update at all when data is entered into any of the data wells - Measure Card, Variance Indicator, Date, Actuals, Target, or Forecast.
2) Thus, I used a single categorical data mapping such that the Measure Card, Variance Indicator, Actuals, Target, and Forecast series are all grouped by Date. However, the problem now is that entering data into the date well affects the numbers in the Measure Card and Variance Indicator - I think this is because they are affected by the change that occurs to the dataView as date data is used to group the data.
How can I troubleshoot this problem such that each of the displays (the two cards and line area chart) can handle data separately?