-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sentiment chart #265
Sentiment chart #265
Conversation
marcbon
commented
Sep 1, 2023
… string or number 🐛 fix(_data.ts): add custom_data property to data object 🐛 fix(_types.ts): make y property in LineData optional 🐛 fix(index.stories.tsx): change width of tooltip divs 🐛 fix(index.tsx): remove unused imports and components ✨ feat(index.tsx): add support for isScrollable prop in LineChart component
✨ feat(line/index.tsx): add curve="monotoneX" prop to Line component ✨ feat(line/index.tsx): add markers to Line component
🐛 fix(line/index.stories.tsx): remove axisBottomLabel prop from LineChart component
…function from 'http' module
🐛 fix(globalStyle.ts): fix typo in ::-webkit-scrollbar height property
🐛 fix(_types.ts): change LineData type to be an object instead of an array 🐛 fix(index.stories.tsx): update component name and add missing imports ✨ feat(index.stories.tsx): add title and description to LineChart component ✨ feat(index.stories.tsx): add custom tooltip functionality to LineChart component ✨ feat(index.stories.tsx): add scrollable LineChart component 🐛 fix(line/index.tsx): import SliceTooltipProps from @nivo/line ✨ feat(line/index.tsx): add support for interactive tooltips using SliceTooltipProps 🔧 chore(line/index.tsx): remove unused axisLeftLabel and axisBottomLabel props 🎨 style(line/index.tsx): update styling for ScrollingContainer component 🔧 chore(line/index.tsx): remove useMesh prop from ResponsiveLine component ✨ feat(line/index.tsx): enable interactivity and slices in ResponsiveLine component
…iment" 🐛 fix(line/index.tsx): fix enableSlices value from "y" to "x"
🔥 refactor(line/index.tsx): remove unused import of MD from typography/typescale 🔥 refactor(line/index.tsx): remove unused import of Tooltip from tooltip 🔥 refactor(line/index.tsx): remove unused code for Point component
✨ feat(_types.ts): remove isScrollable prop from LineChartProps interface ✨ feat(index.stories.tsx): remove unused imports and update styles in Template component ✨ feat(index.stories.tsx): update Scrollable story to use Template component 🐛 fix(index.tsx): update tooltip prop in LineChart component
🗑️ remove(line/assets/sentiment_0.svg): remove unused SVG file 🎨 style(sentiment_1.svg): update fill color of sentiment icon to #E9979B 🎨 style(sentiment_2.svg): update fill color for sentiment icon 🎨 chore(sentiment_3.svg): update fill color to #FFD7A4 🎨 chore(sentiment_4.svg): update fill color to #B3E8D9 🆕 feat(sentiment_5.svg): add new SVG file for sentiment value 5 🔧 chore(index.stories.tsx): update line chart component to include new sentiment SVG 🔨 refactor(line/index.tsx): remove unused sentiment_0.svg import ✨ feat(line/index.tsx): add support for sentiment_5.svg 🔨 refactor(line/index.tsx): change LineContainer to extend ChartContainer 🔨 refactor(line/index.tsx): remove width and height props from LineContainer 🔨 refactor(line/index.tsx): remove style prop from LineContainer 🔨 refactor(line/index.tsx): remove unused imports 🔨 refactor(line/index.tsx): reformat code for better readability 🔨 refactor(line/index.tsx): reorganize props for ResponsiveLine component 🔨 refactor(line/index.tsx): reorganize markers array 🔨 refactor(line/index.tsx): remove unused props from ResponsiveLine component
✨ feat(line/index.stories.tsx): rename LineChart to SentimentChart and update imports and types 🐛 fix(line/index.tsx): rename LineChart to SentimentChart and update imports and types
🐛 fix(line): use theme palette grey[600] for colors in index.tsx
Ci sono 77 componenti nel tuo branch e 76 componenti nel branch target, ma nessuna modifica nell'index.tsx. 🤷♂️ |
|
||
const DEFAULT_CHART_MARGINS = { top: 0, right: 0, bottom: 30, left: 30 }; | ||
|
||
const formatSentiment = (value: DatumValue) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
questo formatSentiment come gestisce le traduzioni?conviene aggiungere il parametro i18n
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
giusto, va anche messa la traduzione per "Neutral" la linea mediana
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in realtà le label per i sentiment non sono più usate in seguito alle modifiche sul design del componente, ma manterrei comunque la funzione per tutti i valori dei sentiment anche se attualmente è usato solo "neutral"
…types in SentimentChartProps
…t, and margin props to SentimentChart component ✨ feat(index.stories.tsx): add support for custom tooltip in SentimentChart component
…ctNode in data field
✨ feat(_types.ts): add i18n property to SentimentChartProps interface
✨ feat(sentiment/index.tsx): add i18n prop to formatPoint function ✨ feat(sentiment/index.tsx): add i18n prop to tooltip function
…function ✨ feat(index.stories.tsx): extract common arguments into a constant and use it in Default and WithCustomTooltip stories